Beispiel #1
0
        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);
        }
Beispiel #2
0
 //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;
 }
Beispiel #3
0
 public void setMember(cls_member val, decimal dc, decimal amount, bool isHistory)
 {
     this.member_obj = val;
     this.activateDiscount(this.dchead_membertype, dc, amount, true, true);
 }
Beispiel #4
0
 public cls_discountlist(int headdetail_val)
 {
     this.disclist   = new List <cls_discount>();
     this.headdetail = headdetail_val;
     this.member_obj = new cls_member();
 }
Beispiel #5
0
 public void setmember(cls_member member_d)
 {
     this.member = member_d;
 }