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 cls_payment DeepCopy() { cls_payment payment_clone = (cls_payment)this.MemberwiseClone(); payment_clone.set_creditcard(this.creditcard.Select(i => i.ShallowCopy()).ToList()); payment_clone.set_debitcard(this.debitcard.Select(i => i.ShallowCopy()).ToList()); payment_clone.set_giftchequenew(this.giftchequenew.Select(i => i.ShallowCopy()).ToList()); payment_clone.set_custompayments(this.list_custompayment.Select(i => i.ShallowCopy()).ToList()); return(payment_clone); }
//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 setpayments(cls_payment payments_d) { this.payments = payments_d; }