Exemple #1
0
        /// <summary>
        /// 更新提交信息
        /// </summary>
        /// <param name="issuccess"></param>
        /// <returns></returns>
        public int UpDatePostInfo(int issuccess)
        {
            if (this.postBillInfo == null)
            {
                this.postBillInfo = new XYPostBillInfo();

                this.postBillInfo.BillNumberId = this.sheet_id;
                this.postBillInfo.IsSuccess = issuccess;
                this.postBillInfo.HasPosts = 1;
                this.postBillInfo.FirstPostDate = DateTime.Now;
                this.postBillInfo.LastPostDate = DateTime.Now;
            }
            else
            {
                this.postBillInfo.IsSuccess = issuccess;
                this.postBillInfo.HasPosts += 1;
                this.postBillInfo.LastPostDate = DateTime.Now;
            }

            return this.postBillInfo.UpdatePostInfo();
        }
Exemple #2
0
        /// <summary>
        /// 获取单据提交信息
        /// </summary>
        /// <param name="billnumberid"></param>
        /// <returns></returns>
        public static XYPostBillInfo GetSaleBillPostInfo(object billnumberid)
        {
            XYPostBillInfo rv = new XYPostBillInfo();

            DataRow row = DBHelper.ExecuteSqlGetSingleRow("SELECT * FROM dbo.Ex_IsPostSuccess WHERE BillNumberId = @billnumberid", new SqlParameter[] { new SqlParameter("@billnumberid", billnumberid) }, CommandType.Text);

            if (row == null)
                return null;
            else
            {
                rv.BillNumberId = Convert.ToInt32(row["BillNumberId"]);
                rv.IsSuccess = Convert.ToInt32(row["IsSuccess"]);
                rv.HasPosts = Convert.ToInt32(row["HasPosts"]);
                rv.FirstPostDate = Convert.ToDateTime(row["FirstPostDate"]);
                rv.LastPostDate = Convert.ToDateTime(row["LastPostDate"]);
            }

            return rv;
        }
Exemple #3
0
 public XYSaleBill(int billtype, string card_num, string token, DateTime create_time, int sheet_id, string dealer, string store, string desc, string comment, double total_cost, int oid, DealType deal_type, List<XYBillDetail> items,XYPostBillInfo postbillinfo)
 {
     this._billtype = billtype;
     this._card_num = card_num;
     this._token = token;
     this._create_time = create_time;
     this._sheet_id = sheet_id;
     this._dealer = dealer;
     this._store = store;
     this._desc = desc;
     this._comment = comment;
     this._total_cost = total_cost;
     this._oid = oid;
     this._deal_type = deal_type;
     this._items = items;
     this.postBillInfo = postbillinfo;
 }