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 setsenior(cls_senior senior_d) { this.senior = senior_d; if (this.senior.get_idnumber() != "") { this.get_productlist().set_issenior(true); } else { this.get_productlist().set_issenior(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; }