/*----------------------------------------------------------------------------*/ bool KsefDocument :: assign(QDomElement& e, bool deep) { /* QDomNode parent = e.parentNode(); while(!parent.parentNode().isDocument() && !parent.isNull()) parent = parent.parentNode(); */ //if(mDoc.isNull() || !parent.isDocument() || parent.toDocument() != mDoc) { mDoc.clear(); mDoc.appendChild(mDoc.importNode(e, true)); } if(e.tagName() != "DAT") return false; mSerial = e.attribute("ZN"); mTax = e.attribute("TN"); mFiscal = e.attribute("FN"); mDi = e.attribute("DI").toInt(); QDomElement ts = e.firstChildElement("TS"); if(!ts.isNull()) { mTime = ts2time(ts.text()); } if(mSerial.isEmpty()) return false; if(deep) { QDomElement c = e.firstChildElement(); while(!c.isNull()) { if(c.tagName() == "C") { int t = c.attribute("T", "-1").toInt(); if(t >= 0) { KsefBill bill((KsefBill::Type) t); if(bill.assign(c)) mBills.append(bill); } } if(c.tagName() == "Z") { KsefBill bill(KsefBill::Report); if(bill.assign(c)) mBills.append(bill); } c = c.nextSiblingElement(); } } return true; }
int main() { int i; bill("Hello World"); for(i=0;i<10;i++) fred(i); exit(0); }
int main (void) { // Note that we can say that an Employee is not necessarily // a Manager, but a Manager is an Employee (this is inheritance!!!) Employee joe("joe", 5.67, 3.5); Manager bill("bill", 2000.00, 55, true); cout << "Employee Joe: " << joe.calculatePay () << endl; cout << "Manager bill: " << bill.calculatePay () << endl; return 0; }
int main() { Bureaucrat diego("Diego", 35); Bureaucrat tom("Tom", 140); Bureaucrat sylvie("Sylvie", 150); ShrubberyCreationForm A("home"); std::cout << diego; std::cout << tom; std::cout << A; sylvie.executeForm(A); sylvie.signForm(A); sylvie.executeForm(A); std::cout << A; tom.executeForm(A); tom.signForm(A); tom.executeForm(A); std::cout << A; diego.executeForm(A); diego.signForm(A); diego.executeForm(A); RobotomyRequestForm B("Hillary"); std::cout << B; sylvie.signForm(B); std::cout << B; tom.signForm(B); std::cout << B; diego.signForm(B); diego.executeForm(B); diego.executeForm(B); diego.executeForm(B); diego.executeForm(B); Bureaucrat bill("Bill", 5); PresidentialPardonForm C("Bill Clinton"); std::cout << C; sylvie.signForm(C); std::cout << C; tom.signForm(C); std::cout << C; diego.signForm(C); bill.executeForm(C); bill.signForm(C); bill.executeForm(C); return 0; }
bool CEauApi::AddProjectBill(const string &pid, binfo_t &binfo) { returnb_assert(m_bSigned); map<string, proj_t>::iterator iter = m_vProjs.find(pid); if (iter == m_vProjs.end()) return false; // only project owner and member can add new bill proj_t &proj = iter->second; map<string, user_t>::iterator uiter = proj.users.find(m_szUser); if (uiter == proj.users.end()) return false; user_t &user = uiter->second; if (user.role != "owner" && user.role != "member") return false; // gen bill id(bid) binfo.bid = uuid_generate_string(); binfo.creator = m_szUser; binfo.cdate = now_to_string(); binfo.mdate = binfo.cdate; // set bill stat bill_t bill(binfo); bill.stat = "wait"; // new bill need all owners' permission for(uiter=proj.users.begin(); uiter != proj.users.end(); uiter++) { if (uiter->second.role == "owner") bill.todo[uiter->first] = "ing"; } // if only one owner and also he/she is bill creator if (bill.todo.find(m_szUser) != bill.todo.end()) { bill.todo[m_szUser] = "yes"; if (bill.todo.size() == 1) bill.stat = "approve"; } proj.bills[binfo.bid] = bill; return true; }
void order() { fs=fopen("noe.txt","r"); fp=fopen("PROJECT.txt","r"); if((fp!=NULL)&&(fs!=NULL)) { do { system("cls"); printf("\n\n Enter your choice :-"); printf("\n\n 1.Student"); printf("\n\n 2.Outsider"); printf("\n\n 3.Exit to Main Menu "); fflush(stdin); scanf("%c",&ch); if(ch=='1') { f2=fopen("nos.txt","r"); f1=fopen("STUDENT.txt","r"); if((f1!=NULL)&&(f2!=NULL)) { searchstudent(); if(z==0) { printf("\n\n Do you want to purchase any Item (y/any key) ? "); fflush(stdin); scanf("%c",&k); if((k=='y')||(k=='Y')) { bill(); } else s=0; duepayment(); fclose(f1); fclose(f2); } } else { system("cls"); printf("\n\n Student record doesn't exist"); getch(); } } else if(ch=='2') { bill(); } else if(ch=='3') { fclose(fp); fclose(fs); break; } else { printf("\n\n You have entered a wrong choice"); getch(); } }while(1); fclose(fp); fclose(fs); } else { system("cls"); printf("\n\n Menu doesn't exist"); getch(); } }
int main() { bill("Hello niuniu "); fred(20); exit(0); }
double Sale::savings(const Sale& other) const { return (bill() - other.bill()); }
int main(void) { bill((char*)"sdaf"); return 0; }
int main() { bill("Hello World !"); exit(0); }
int main(){ bill("hello world"); fred(111); exit(0); }
void main() { clrscr(); cout<<"\t\t WELLCOME IN MEDICAL-BILLING SOFTWARE\n\n"; cout<<"\t\t HINDUSTAN ZINC LIMITED, DEBARI (VEDANTA GROUP OF COMPANIES)"; cout<<"\n\n\n\n\nPrepared by :\n\nNEERAJ SUTHAR"; getch(); ob.ini(); clrscr(); int i,n; char ch,z,y,x; ofstream o; fflush(stdin); do { ob.head(); cout<<"\t\t WELLCOME IN MEDICAL-BILLING SOFTWARE\n\n"; cout<<"HINDUSTAN ZINC LIMITED, DEBARI (VEDANTA GROUP)"; showtime(); for(int b=0;b<80;b++) cout<<"-"; cout<<"\n\n\n\t\t\t * MAIN MENU *\t\n"; cout<<"\n\n\n\t\t\t 1. ENTER EMPLOYEE DATA.\n\n\n\t\t\t "; cout<<"2. ENTER BILL AMOUNT.\n\n\n\t\t\t"; cout<<" 3. DISPLAY BILLWISE CHECKLIST.\n\n\n\t\t\t "; cout<<"4. DISPLAY PAYMENT LIST OF BILLS.\n\n\n\t\t\t "; cout<<"5. DISPLAY NOTICE BOARD.\n\n\n\t\t\t "; cout<<"6. DISPLAY BANK ACCOUNT LIST.\n\n\n\t\t\t "; cout<<"7. SEARCH THE EMPLOYEE.\n\n\n\t\t\t 8. EXIT."; cout<<"\n\n\n\t\t\t ENTER YOUR CHOICE :\t"; cin>>n; clrscr(); switch(n) case 1: { ob.head(); cout<<"\n\t\t WORKMEN DATA ENTRY PAGE\n\n"; cout<<"DEBARI,ZINC SMELTER"; showtime(); for(int b=0;b<80;b++) cout<<"-"; int i=0; long ll; do { cout<<"\n\n\t\tENTER EMPLOYEE CODE:-"; fflush(stdin); cin>>ll; if(ll<100000 || ll>999999) cout<<"\n\n\n\t\t-*** INVALID EMPLOYEE CODE ***-\n\n\t"<< "\t (PLEASE ENTER SIX DIGIT CODE)"; else { i=see(ll); if(i==1) { cout<<"\n\n\n\t\tRECORD ALREADY PRESENT WITH THIS CODE"; cout<<"\n\n\t\t(PLEASE ENTER NEW CODE)"; } else { time_t now=time(0); tm *t1=localtime(&now); asctime(t1); ob.t.tm_sec=t1->tm_sec; ob.t.tm_min=t1->tm_min; ob.t.tm_hour=t1->tm_hour; ob.t.tm_mday=t1->tm_mday; ob.t.tm_mon=t1->tm_mon; ob.t.tm_year=t1->tm_year; ob.edata(ll); ob.inc(); o.open("emp.txt",ios::app|ios::binary); o.write((char*)&ob,sizeof(ob)); o.close(); } } cout<<"\n\n\t PRESS (Y/y) TO CONTINUE ELSE PRESS ANY OTHER KEY:-"; cin>>z; } while(z=='y'||z=='Y'); break; case 2: clrscr(); ob.head(); cout<<"\n\t\t BILL AMOUNT ENTRY LIST\n\n"; cout<<"DEBARI,ZINC SMELTER"; showtime(); for(int qq=0;qq<80;qq++) cout<<"-"; fflush(stdin); do { bill(); cout<<"\n\n\t PRESS (Y/y) TO CONTINUE ELSE PRESS ANY OTHER KEY:-"; cin>>y; } while(y=='y'||y=='Y'); break; case 3: clrscr(); ob.head(); cout<<"\t\t MEDICAL BILLWISE CHECKLIST OF WORKMEN"; cout<<" \n\nDEBARI,ZINC SMELTER"; showtime(); for(int q=0;q<80;q++) cout<<"-"; cout<<"Slno"<<" "<<"Empcd"<<" "<<"EMPLOYEE NAME"; for(i=0;i<7;i++) cout<<" "; cout<<"Designation"; for(i=0;i<7;i++) cout<<" "; cout<<"BillNo"<<" "<<"Billamt"<<" "<<"Nrmt"<<" "<<"Dcode\n"; for(int v=0;v<80;v++) cout<<"-"; cout<<"\n"; show(); break; case 5: clrscr(); ob.head(); cout<<"\n\t\t NOTICE BOARD\WORKMEN MEDICAL REIMBURSEMENT LIST\n\n"; cout<<"DEBARI,ZINC SMELTER"; showtime(); for(int h=0;h<80;h++) cout<<"-"; cout<<"\tEMP.NO.\t"<<"\t"<<" RS.\t"<<"\tNR-RS\t"; // <<"\tDATE AND TIME\n" ; for(int g=0;g<80;g++) cout<<"-"; cout<<"\n"; notice(); break; case 6: clrscr(); ob.head(); cout<<"\n\t\t WORKMEN BANK ACCOUNT LIST\n\n"; cout<<"DEBARI,ZINC SMELTER"; showtime(); for(int z=0;z<80;z++) cout<<"-"; cout<<"Slno"<<" "<<"Empcd"<<" "<<"EMPLOYEE NAME"; for(i=1;i<=10;i++) cout<<" "; cout<<"BANK NAME "<<" "<<"BANK a/c"<<" "<<"AMOUNT"; cout<<"\n"; for(int l=0;l<80;l++) cout<<"-"; badisp(); break; case 4: clrscr(); ob.head(); cout<<"\n\t\t EMPLOYEEWISE PAYMENT LIST OF BILLS\n\n"; cout<<"DEBARI,ZINC SMELTER"; showtime(); for(int zx=0;zx<80;zx++) cout<<"-"; cout<<"EMPCD"<<" "<<"EMPLOYEE NAME"<<" "<<"DEPARTMENT" <<" "<<"NRMT"<<" "<<"DCODE"<<" "<<"BILLNO" <<" "<<"BILLAMT"<<" "<<"PAY."<<" "<< "DATE"<<" "<<"SIGN."; cout<<endl; for( zx=0;zx<80;zx++) cout<<"-"; ob.display(); break; case 7: clrscr(); ob.head(); cout<<"\n\t\t INFORMATION OF WORKMEN\n\n"; cout<<"DEBARI,ZINC SMELTER"; showtime(); for(int t=0;t<80;t++) cout<<"-"; do { search(); cout<<"\n\n\t PRESS (Y/y) TO CONTINUE ELSE PRESS ANY OTHER KEY:--"; cin>>x; } while(x=='y'||x=='Y'); break; case 8: goto ll; default: ob.head(); for(int zz=0;zz<80;zz++) cout<<"-"; cout<<"\n\n\n\n\t\t\t--*** WRONG CHOICE ***--\n\n\t"; } do{ cout<<"\n\n\n\n\n\t\tIF YOU WANT TO GO TO MAIN MENU THEN PRESS (g/G)-- "; cin>>ch; if(ch!='g') { cout<<"\n WRONG CHOICE"; } }while(ch!='g'); clrscr(); }while(ch=='g'|| ch=='G'); ll: cout<<" "; clrscr(); cout<<"\nPrepared by:\n\nNEERAJ SUTHAR\nB.TECH-2nd YEAR(INFORMATION TECHNOLOGY)"; cout<<"\nCOLLEGE OF TECHNOLOGY AND ENGINEERING, UDAIPUR\n\n"; cout<<"\nPress Any Key to EXIT this program.\n\nThanks For VISIT."; getch(); }
int main() { bill(); }