public void set_transaction_by_wid(long SyncId, bool status) { this.syncid = SyncId; string sSQL = "SELECT * FROM `saleshead` WHERE `SyncId` = " + SyncId; DataTable dt = mySQLFunc.getdb(sSQL); if (dt.Rows.Count <= 0) { this.syncid = 0; return; } DataRow dr = dt.Rows[0]; this.OfficialReceiptNo = long.Parse(dr["ornumber"].ToString()); this.adjust = Convert.ToDecimal(dr["adjust"]); this.discount = Convert.ToDecimal(dr["discount1"]); this.salesdatetime = DateTime.Parse(dr["date"].ToString()); this.senior = new cls_senior(); this.senior.set_senior(dr["seniorno"].ToString(), dr["seniorname"].ToString()); this.memo = dr["memo"].ToString(); Int32.TryParse(dr["show"].ToString(), out this.show); Int32.TryParse(dr["status"].ToString(), out this.status); this.clerk = new cls_user(Convert.ToInt32(dr["userid"]), status); this.checker = new cls_user(Convert.ToInt32(dr["checkerid"]), status); this.customer = new cls_customer(Convert.ToInt32(dr["customerid"]), status); this.member = new cls_member(Convert.ToInt32(dr["memberid"]), status); this.payments = new cls_payment(SyncId); this.productlist = new cls_productlist(); this.productlist.set_productlist_by_wid(SyncId, status); }
public void init() { this.customerHistoricalPricingFlag = false; this.syncid = 0; this.barcode = ""; this.singlebarcode = ""; this.productname = ""; this.qty = 1; this.price = 0; this.wholesaleprice = 0; this.memo = ""; this.retailpprice = 0; this.retailprice = 0; this.amount = 0; this.pprice = 0; this.origprice = 0; this.vat = 0; this.soldby = new cls_user(); this.price_suffix = ""; this.isvat = true; this.issenior = 0; this.adjust = 0; this.discount = 0; this.productmode = ""; this.transaction_mode = "vatable_sale"; this.productdiscount = new cls_discountlist(1); this.is_history = false; }
//constructor public cls_POSTransaction() { this.syncid = 0; this.OfficialReceiptNo = 0; this.adjust = 0; this.discount = 0; this.salesdatetime = DateTime.Now; this.productlist = new cls_productlist(); this.clerk = new cls_user(); this.checker = new cls_user(); this.salesman = new cls_user(); this.customer = new cls_customer(); this.member = new cls_member(); this.payments = new cls_payment(); this.senior = new cls_senior(); this.nonvat = new cls_nonvat(); this.memo = ""; this.UserAuthorizer = new cls_user(); this.show = 0; this.status = 0; }
public void get_cashdenomination(cls_user cashier, int type) { string branchid = cls_globalvariables.BranchCode; string terminalno = cls_globalvariables.terminalno_v; long userwid = cashier.getsyncid(); string sSQL = @"SELECT * FROM `poscashdenomination` WHERE `branchid` = " + branchid + @" AND `terminalno` = " + terminalno + @" AND DATE(`datecreated`) = DATE(NOW()) AND `type` = " + type + @" ORDER BY `datecreated` DESC LIMIT 1"; DataTable dt = mySQLFunc.getdb(sSQL); if (dt.Rows.Count <= 0) { return; } DataRow dr = dt.Rows[0]; this.cash_1000 = Convert.ToInt32(dr["b1000"]); this.cash_500 = Convert.ToInt32(dr["b500"]); this.cash_200 = Convert.ToInt32(dr["b200"]); this.cash_100 = Convert.ToInt32(dr["b100"]); this.cash_50 = Convert.ToInt32(dr["b50"]); this.cash_20 = Convert.ToInt32(dr["b20"]); this.cash_10 = Convert.ToInt32(dr["c10"]); this.cash_5 = Convert.ToInt32(dr["c5"]); this.cash_1 = Convert.ToInt32(dr["c1"]); this.cash_25c = Convert.ToInt32(dr["c25c"]); this.cash_10c = Convert.ToInt32(dr["c10c"]); this.cash_5c = Convert.ToInt32(dr["c5c"]); this.type = 0; }
public void save_cashdenomination(cls_user cashier) { //type: //1 - beginning //2 - pickup //3 - ending mySQLClass mysqlclass = new mySQLClass(); string branchid = cls_globalvariables.BranchCode; string terminalno = cls_globalvariables.terminalno_v; long userwid = cashier.getsyncid(); long SyncId = mysqlclass.GetAndInsertNextSyncId("poscashdenomination"); if (this.get_type() == 3) { mySQLFunc.setdb(@"UPDATE `poscashdenomination` SET `type` = 2 WHERE `type` = 3 AND CAST(`datecreated` AS DATE) = CAST(NOW() AS DATE) AND `branchid` = " + branchid + @" AND `terminalno` = " + terminalno); } string sSQL = @"UPDATE `poscashdenomination` SET `branchid` = " + branchid + ", `terminalno` = " + terminalno + ", `userid` = " + userwid + ", `datecreated` = NOW(), `type` = " + this.get_type() + ", `b1000` = " + this.getCash_1000() + ", `b500` = " + this.getCash_500() + ", `b200` = " + this.getCash_200() + ", `b100` = " + this.getCash_100() + ", `b50` = " + this.getCash_50() + ", `b20` = " + this.getCash_20() + ", `c10` = " + this.getCash_10() + ", `c5` = " + this.getCash_5() + ", `c1` = " + this.getCash_1() + ", `c25c` = " + this.getCash_25c() + ", `c10c` = " + this.getCash_10c() + ", `c5c` = " + this.getCash_5c() + @" WHERE `SyncId` = " + SyncId + " LIMIT 1"; //Console.WriteLine(sSQL); mySQLFunc.setdb(sSQL); mysqlclass.update_synctable("poscashdenomination", SyncId); }
public void setSoldBy(cls_user soldby_d) { this.soldby = soldby_d; }
public void set_UserAuthorizer(cls_user permissiongiver_d) { this.UserAuthorizer = permissiongiver_d; }
public void setsalesman(cls_user salesman_d) { this.salesman = salesman_d; }
public void setchecker(cls_user checker_d) { this.checker = checker_d; }
public void setclerk(cls_user clerk_d) { this.clerk = clerk_d; }