Exemplo n.º 1
0
        /// <summary>
        /// 修改物品档案
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public static bool UpdateProductPriceInfo(ProductPriceChangeModel model)
        {
            UserInfoUtil userInfo = (UserInfoUtil)SessionUtil.Session["UserInfo"];

            try
            {
                bool         succ     = false;
                LogInfoModel logModel = InitLogInfo(model.ChangeNo);
                logModel.Element = ConstUtil.LOG_PROCESS_UPDATE;
                succ             = ProductPriceChangeDBHelper.UpdateProductPriceInfo(model);
                if (!succ)
                {
                    logModel.Remark = ConstUtil.LOG_PROCESS_FAILED;
                }
                else
                {
                    logModel.Remark = ConstUtil.LOG_PROCESS_SUCCESS;
                }
                LogDBHelper.InsertLog(logModel);
                return(succ);
            }
            catch (Exception ex)
            {
                WriteSystemLog(userInfo, ex);
                return(false);
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// 查询获取物品信息
        /// </summary>
        /// <param name="Model"></param>
        /// <returns></returns>
        public static DataTable GetProductPriceInfo(ProductPriceChangeModel Model, string Starttime, string Endtime, int pageIndex, int pageCount, string OrderBy, ref int totalCount)
        {
            try
            {
                return(ProductPriceChangeDBHelper.GetProductPriceInfo(Model, Starttime, Endtime, pageIndex, pageCount, OrderBy, ref totalCount));
            }
            catch (Exception ex)
            {
                return(null);

                throw ex;
            }
        }
Exemplo n.º 3
0
        /// <summary>
        /// 删除物品信息
        /// </summary>
        /// <param name="ID"></param>
        /// <param name="CompanyCD"></param>
        /// <returns></returns>
        public static bool DeleteProductPriceInfo(string ID)
        {
            if (string.IsNullOrEmpty(ID))
            {
                return(false);
            }
            UserInfoUtil userInfo  = (UserInfoUtil)SessionUtil.Session["UserInfo"];
            string       CompanyCD = userInfo.CompanyCD;
            //string CompanyCD = "AAAAAA";
            bool isSucc = ProductPriceChangeDBHelper.DeleteProductPriceInfo(ID, CompanyCD);
            //定义变量
            string remark;

            //成功时
            if (isSucc)
            {
                //设置操作成功标识
                remark = ConstUtil.LOG_PROCESS_SUCCESS;
            }
            else
            {
                //设置操作成功标识
                remark = ConstUtil.LOG_PROCESS_FAILED;
            }
            //获取删除的编号列表
            string[] noList = ID.Split(',');
            //遍历所有编号,登陆操作日志
            for (int i = 0; i < noList.Length; i++)
            {
                //获取编号
                string no = noList[i];
                //替换两边的 '
                no = no.Replace("'", string.Empty);

                //操作日志
                LogInfoModel logModel = InitLogInfo("变更单ID:" + no);
                //涉及关键元素 这个需要根据每个页面具体设置,本页面暂时设置为空
                logModel.Element = ConstUtil.LOG_PROCESS_DELETE;
                //设置操作成功标识
                logModel.Remark = remark;

                //登陆日志
                LogDBHelper.InsertLog(logModel);
            }
            return(isSucc);
        }
Exemplo n.º 4
0
        /// <summary>
        /// 根据ID获取物品信息
        /// </summary>
        /// <param name="ID"></param>
        /// <returns></returns>
        public static DataTable GetProductPriceInfoByID(int ID)
        {
            if (ID == 0)
            {
                return(null);
            }
            try
            {
                return(ProductPriceChangeDBHelper.GetProductPriceInfoByID(ID));
            }
            catch (Exception ex)
            {
                return(null);

                throw ex;
            }
        }
Exemplo n.º 5
0
        public static bool UpdateStatus(int ID, string BillStatus, int ProductID, string StandardSell, string SellTax, string Confirmor, string ConfirmDate, string TaxRateNew, string DiscountNew)
        {
            UserInfoUtil userInfo       = (UserInfoUtil)SessionUtil.Session["UserInfo"];
            string       ModifiedUserID = userInfo.UserID;

            if (string.IsNullOrEmpty(BillStatus))
            {
                return(false);
            }
            try
            {
                return(ProductPriceChangeDBHelper.UpdateStatus(ID, BillStatus, ProductID, StandardSell, SellTax, Confirmor, ConfirmDate, TaxRateNew, DiscountNew, ModifiedUserID));
            }
            catch (Exception)
            {
                return(false);

                throw;
            }
        }