コード例 #1
0
        /// <summary>
        /// 插入物品档案信息
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public static bool InsertProductInfo(ProductInfoModel model, out string ID, Hashtable htExtAttr)
        {
            UserInfoUtil userInfo = (UserInfoUtil)SessionUtil.Session["UserInfo"];

            ID = "0";
            try
            {
                bool         succ     = false;
                LogInfoModel logModel = InitLogInfo(model.ProdNo);
                logModel.Element = ConstUtil.LOG_PROCESS_INSERT;
                succ             = ProductInfoDBHelper.InsertProductInfo(model, out ID, htExtAttr);
                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);
            }
        }
コード例 #2
0
 /// <summary>
 /// 根据输入的物品编号获取匹配的物品信息
 /// </summary>
 /// <param name="CompanyCD"></param>
 /// <param name="ProdNo"></param>
 /// <returns></returns>
 public static DataTable GetMatchProductInfo(string CompanyCD, string ProdNo)
 {
     try
     {
         return(ProductInfoDBHelper.GetMatchProductInfo(CompanyCD, ProdNo));
     }
     catch (System.Exception ex)
     {
         throw ex;
     }
 }
コード例 #3
0
 //采购用
 public static DataTable GetProductInfoTableBycondition(ProductInfoModel model, int pageIndex, int pageCount, string OrderBy, ref int totalCount)
 {
     try
     {
         return(ProductInfoDBHelper.GetProductInfoTableBycondition(model, pageIndex, pageCount, OrderBy, ref totalCount));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
コード例 #4
0
 /// <summary>
 /// 如果不存在则返回false,如果存在则返回true; add by hm
 /// </summary>
 /// <param name="BarCode"></param>
 /// <param name="CompanyCD"></param>
 /// <returns></returns>
 public static bool CheckBarCode(string BarCode, string CompanyCD)
 {
     try
     {
         return(ProductInfoDBHelper.CheckBarCode(BarCode, CompanyCD));
     }
     catch (Exception)
     {
         throw;
     }
 }
コード例 #5
0
        /// <summary>
        /// 当前库存量
        /// </summary>
        /// <returns>DataTable</returns>
        public static DataTable GetStorageCount(int ProductID)
        {
            try
            {
                return(ProductInfoDBHelper.GetStorageCount(ProductID));
            }
            catch (Exception)
            {
                return(null);

                throw;
            }
        }
コード例 #6
0
        /// <summary>
        /// 查询获取物品信息
        /// </summary>
        /// <param name="Model"></param>
        /// <returns></returns>
        public static DataTable GetProductInfo(ProductInfoModel Model, string EFIndex, string EFDesc, int pageIndex, int pageCount, string OrderBy, ref int totalCount)
        {
            try
            {
                return(ProductInfoDBHelper.GetProductInfo(Model, EFIndex, EFDesc, pageIndex, pageCount, OrderBy, ref totalCount));
            }
            catch (Exception ex)
            {
                return(null);

                throw ex;
            }
        }
コード例 #7
0
        public static DataTable GetProductInfoTableByCheckcondition(string strid)
        {
            try
            {
                UserInfoUtil userInfo  = (UserInfoUtil)SessionUtil.Session["UserInfo"];
                string       CompanyCD = userInfo.CompanyCD;
                return(ProductInfoDBHelper.GetProductInfoTableByCheckcondition(strid, CompanyCD));
            }
            catch (Exception ex)
            {
                return(null);

                throw ex;
            }
        }
コード例 #8
0
        /// <summary>
        /// 删除物品信息
        /// </summary>
        /// <param name="ID"></param>
        /// <param name="CompanyCD"></param>
        /// <returns></returns>
        public static bool DeleteProductInfo(string ID)
        {
            if (string.IsNullOrEmpty(ID))
            {
                return(false);
            }
            UserInfoUtil userInfo  = (UserInfoUtil)SessionUtil.Session["UserInfo"];
            string       CompanyCD = userInfo.CompanyCD;
            //string CompanyCD = "AAAAAA";
            bool isSucc = ProductInfoDBHelper.DeleteProductInfo(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);
        }
コード例 #9
0
        /// <summary>
        /// 根据ID获取物品信息
        /// </summary>
        /// <param name="ID"></param>
        /// <returns></returns>
        public static DataTable GetProductInfoByAttr(int ID)
        {
            if (ID == 0)
            {
                return(null);
            }
            try
            {
                return(ProductInfoDBHelper.GetProductInfoByAttr(ID));
            }
            catch (Exception ex)
            {
                return(null);

                throw ex;
            }
        }
コード例 #10
0
        /// <summary>
        /// 判断是否已存在
        /// </summary>
        /// <param name="ProductID"></param>
        /// <param name="CompanyCD"></param>
        /// <returns></returns>
        public static bool Existss(string ProductID)
        {
            UserInfoUtil userInfo  = (UserInfoUtil)SessionUtil.Session["UserInfo"];
            string       CompanyCD = userInfo.CompanyCD;

            string[] IdS = null;
            ProductID = ProductID.Substring(0, ProductID.Length);
            IdS       = ProductID.Split(',');
            for (int i = 0; i < IdS.Length; i++)
            {
                bool isSucc = ProductInfoDBHelper.Exists(IdS[i].ToString(), CompanyCD);
                if (isSucc)
                {
                    return(true);
                }
            }
            return(false);
        }
コード例 #11
0
        /// <summary>
        /// 确认操作
        /// </summary>
        /// <param name="ProductID"></param>
        /// <param name="Status"></param>
        /// <param name="CheckUser"></param>
        /// <param name="CheckDate"></param>
        /// <returns></returns>
        public static bool UpdateStatus(int ProductID, string Status, string CheckUser, string CheckDate, string StorageID)
        {
            if (string.IsNullOrEmpty(Status))
            {
                return(false);
            }
            UserInfoUtil userInfo       = (UserInfoUtil)SessionUtil.Session["UserInfo"];
            string       ModifiedUserID = userInfo.UserID;

            try
            {
                return(ProductInfoDBHelper.UpdateStatus(ProductID, Status, CheckUser, CheckDate, ModifiedUserID, StorageID, userInfo.CompanyCD));
            }
            catch (Exception)
            {
                return(false);

                throw;
            }
        }
コード例 #12
0
        public static DataTable GetProductInfoBatchTableBycondition(ProductInfoModel model, string QueryID, string EFIndex, string EFDesc, int pageIndex, int pageCount, string OrderBy, ref int totalCount)
        {
            try
            {
                DataTable dt = new DataTable();
                if (QueryID == "-1")
                {
                    return(ProductInfoDBHelper.GetProductInfoBycondition(model));
                }
                else
                {
                    return(ProductInfoDBHelper.GetProductInfoBatchTableBycondition(model, QueryID, EFIndex, EFDesc, pageIndex, pageCount, OrderBy, ref totalCount));
                }
            }
            catch (Exception ex)
            {
                return(null);

                throw ex;
            }
        }
コード例 #13
0
 public static void LogInsert(string companyCD, int deptID, string exportEmpID, string exportObject, int exportNum, int exportResult, string exportError)
 {
     ProductInfoDBHelper.LogInsert(companyCD, deptID, exportEmpID, exportObject, exportNum, exportResult, exportError);
 }
コード例 #14
0
 /// <summary>
 /// 判断某物品所有批次是否清零
 /// </summary>
 /// <param name="productID"></param>
 /// <returns></returns>
 public static decimal GetProductCountByAllBatchNo(string prodNo, string companyCD)
 {
     return(ProductInfoDBHelper.GetProductCountByAllBatchNo(prodNo, companyCD));
 }
コード例 #15
0
 /// <summary>
 /// 判断某物品是否已经确认过
 /// </summary>
 /// <param name="ProductID"></param>
 /// <returns></returns>
 public static bool IsConfirmProduct(string ProductID)
 {
     return(ProductInfoDBHelper.IsConfirmProduct(ProductID));
 }
コード例 #16
0
        public static DataTable GetUnitGroupList(string GroupUnitNo)
        {
            UserInfoUtil userInfo = (UserInfoUtil)SessionUtil.Session["UserInfo"];

            return(ProductInfoDBHelper.GetUnitGroupList(userInfo.CompanyCD, GroupUnitNo));
        }
コード例 #17
0
 public static DataSet GetListUnitName(int ProdID)
 {
     return(ProductInfoDBHelper.GetListUnitName(ProdID));
 }
コード例 #18
0
 public static bool ChargeBarCode(string codename, string compid)
 {
     return(ProductInfoDBHelper.ChargeBarCode(codename, compid));
 }
コード例 #19
0
 public static bool ValidateProductColor(string colorName, string companyCD)
 {
     return(ProductInfoDBHelper.ValidateProductColor(colorName, companyCD));
 }
コード例 #20
0
 public static DataSet GetError(string ncode)
 {
     return(ProductInfoDBHelper.GetError(ncode));
 }
コード例 #21
0
 public static string GetLogTitle(string ncode)
 {
     return(ProductInfoDBHelper.GetLogTitle(ncode));
 }
コード例 #22
0
 public static DataTable PurchaseSearchProduct(ProductInfoModel model, int pageIndex, int pageCount, string OrderBy, ref int totalCount)
 {
     return(ProductInfoDBHelper.PurchaseSearchProduct(model, pageIndex, pageCount, OrderBy, ref totalCount));
 }
コード例 #23
0
 public static string GetCompanyUpFilePath(string companycd)
 {
     return(ProductInfoDBHelper.GetCompanyUpFilePath(companycd));
 }
コード例 #24
0
 public static void DeleteFile(string companycd, string filename)
 {
     ProductInfoDBHelper.DeleteFile(companycd, filename);
 }
コード例 #25
0
 public static DataSet GetProductInfoFromExcel(string companycd, string fname, string tbname)
 {
     return(ProductInfoDBHelper.GetProductInfoFromExcel(companycd, fname, tbname));
 }
コード例 #26
0
 public static bool ChargeStorage(string storagename, string compid)
 {
     return(ProductInfoDBHelper.ChargeStorage(storagename, compid));
 }
コード例 #27
0
 public static bool ChargeProduct(string sqlTypeCode, string codeNum, string compNo)
 {
     return(ProductInfoDBHelper.ChargeProduct(sqlTypeCode, codeNum, compNo));
 }
コード例 #28
0
 public static DataSet ReadEexcel(string FilePath, string companycd)
 {
     return(ProductInfoDBHelper.ReadEexcel(FilePath, companycd));
 }
コード例 #29
0
 public static int GetExcelToProductInfo(string companycd, string usercode)
 {
     return(ProductInfoDBHelper.GetExcelToProductInfo(companycd, usercode));
 }
コード例 #30
0
 public static DataTable GetLogPage(string userid, string begindate, string enddate, string mod, string companycd, int pageIndex, int pageCount, string OrderBy, ref int totalCount)
 {
     return(ProductInfoDBHelper.GetLogPage(userid, begindate, enddate, mod, companycd, pageIndex, pageCount, OrderBy, ref totalCount));
 }