Ejemplo n.º 1
0
        /// <summary>
        /// 检验表单数据
        /// </summary>
        /// <returns></returns>
        public bool CheckPageInfo(string type, string Id, string BusCode, string StoCode, string CCode, string CCname, string TStatus, string OrderCodeList, string PKCode, string BillMoney, string PayMoney, string ZeroCutMoney, string ShiftCode, string Remar, string FTime, string OpenDate, string DiscountName, string DiscountMoney, string AUCode, string AUName, string PointMoney, string VirMoney, string BillType, string PayWay, string CStatus)
        {
            bool rel = false;

            try
            {
                Entity         = new TB_BillEntity();
                Entity.Id      = StringHelper.StringToLong(Id);
                Entity.BusCode = BusCode;
                Entity.StoCode = StoCode;
                Entity.CCode   = CCode;
                Entity.CCname  = CCname;

                Entity.TStatus       = TStatus;
                Entity.OrderCodeList = OrderCodeList;
                Entity.PKCode        = PKCode;
                Entity.BillMoney     = StringHelper.StringToDecimal(BillMoney);
                Entity.PayMoney      = StringHelper.StringToDecimal(PayMoney);

                Entity.Remar    = Remar;
                Entity.FTime    = StringHelper.StringToDateTime(FTime);
                Entity.OpenDate = StringHelper.StringToDateTime(OpenDate);

                Entity.BillType = BillType;

                rel = true;
            }
            catch (System.Exception)
            {
            }
            return(rel);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public int Add(ref TB_BillEntity Entity)
 {
     intReturn = 0;
     SqlParameter[] sqlParameters =
     {
         new SqlParameter("@PKCode",        SqlDbType.NVarChar, 32)
         {
             Value = Entity.PKCode
         },
         new SqlParameter("@BusCode",       Entity.BusCode),
         new SqlParameter("@StoCode",       Entity.StoCode),
         new SqlParameter("@CCode",         Entity.CCode),
         new SqlParameter("@CCname",        Entity.CCname),
         new SqlParameter("@OrderCodeList", Entity.OrderCodeList),
         new SqlParameter("@Remar",         Entity.Remar),
         new SqlParameter("@BillType",      Entity.BillType),
     };
     sqlParameters[0].Direction = ParameterDirection.Output;
     intReturn = DBHelper.ExecuteNonQuery("dbo.p_TB_Bill_Add", CommandType.StoredProcedure, sqlParameters);
     if (intReturn == 0)
     {
         Entity.PKCode = sqlParameters[0].Value.ToString();
     }
     return(intReturn);
 }
Ejemplo n.º 3
0
        /// <summary>
        /// 更新一条数据
        /// </summary>
        public void Update(string GUID, string UID, TB_BillEntity UEntity)
        {
            //更新数据
            int result = dal.Update(UEntity);

            //检测执行结果
            CheckResult(result, "");
        }
Ejemplo n.º 4
0
        /// <summary>
        /// 单行数据转实体对象
        /// </summary>
        /// <param name="dr"></param>
        /// <returns></returns>
        private TB_BillEntity SetEntityInfo(DataRow dr)
        {
            TB_BillEntity Entity = new TB_BillEntity();

            Entity.Id      = StringHelper.StringToLong(dr["Id"].ToString());
            Entity.BusCode = dr["BusCode"].ToString();
            Entity.StoCode = dr["StoCode"].ToString();
            Entity.CCode   = dr["CCode"].ToString();
            Entity.CCname  = dr["CCname"].ToString();

            Entity.TStatus       = dr["TStatus"].ToString();
            Entity.OrderCodeList = dr["OrderCodeList"].ToString();
            Entity.PKCode        = dr["PKCode"].ToString();
            Entity.BillMoney     = StringHelper.StringToDecimal(dr["BillMoney"].ToString());
            Entity.PayMoney      = StringHelper.StringToDecimal(dr["PayMoney"].ToString());
            Entity.Remar         = dr["Remar"].ToString();
            Entity.FTime         = StringHelper.StringToDateTime(dr["FTime"].ToString());
            Entity.OpenDate      = StringHelper.StringToDateTime(dr["OpenDate"].ToString());

            return(Entity);
        }
Ejemplo n.º 5
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public int Update(TB_BillEntity Entity)
 {
     SqlParameter[] sqlParameters =
     {
         new SqlParameter("@Id",            Entity.Id),
         new SqlParameter("@BusCode",       Entity.BusCode),
         new SqlParameter("@StoCode",       Entity.StoCode),
         new SqlParameter("@CCode",         Entity.CCode),
         new SqlParameter("@CCname",        Entity.CCname),
         new SqlParameter("@TStatus",       Entity.TStatus),
         new SqlParameter("@OrderCodeList", Entity.OrderCodeList),
         new SqlParameter("@PKCode",        Entity.PKCode),
         new SqlParameter("@BillMoney",     Entity.BillMoney),
         new SqlParameter("@PayMoney",      Entity.PayMoney),
         new SqlParameter("@Remar",         Entity.Remar),
         new SqlParameter("@FTime",         Entity.FTime),
         new SqlParameter("@OpenDate",      Entity.OpenDate),
         new SqlParameter("@BillType",      Entity.BillType),
     };
     return(DBHelper.ExecuteNonQuery("dbo.p_TB_Bill_Update", CommandType.StoredProcedure, sqlParameters));
 }