コード例 #1
0
        public PRO_tblProductGroupLevel1DTO GetDataByID(string username, string language_id, string level1_id)
        {
            PRO_tblProductGroupLevel1DTO result = new PRO_tblProductGroupLevel1DTO();

            try
            {
                DataTable data = db.GetDataTable("PRO_spfrmProductGroupLevel1", new string[] { "Activity", "Username", "LanguageID", "Level1ID" }, new object[] { BaseConstant.COMMAND_GET_DATA_BY_ID_EN, username, language_id, level1_id });
                if (data != null && data.Rows.Count > 0)
                {
                    result = ConvertEngine.ConvertDataTableToObjectList <PRO_tblProductGroupLevel1DTO>(data)[0];
                    return(result);
                }
            }
            catch (Exception ex)
            {
                logger.Error(ex);
            }

            return(result);
        }
コード例 #2
0
        public string InsertLevel1(PRO_tblProductGroupLevel1DTO item)
        {
            string strError = "";

            try
            {
                strError = db.sExecuteSQL("PRO_spfrmProductGroupLevel1", new string[] { "Activity", "Username", "LanguageID", "Level1Code", "Level1ShortCode", "VNName", "ENName", "Rank", "Used", "Note", "Description" }, new object[] { item.Activity, item.UserID, item.LanguageID, item.Level1Code, item.Level1ShortCode, item.VNName, item.ENName, item.Rank, item.Used, item.Note, item.Description });

                if (!string.IsNullOrEmpty(strError))
                {
                    logger.Error(strError);
                }

                return(strError);
            }
            catch (Exception ex)
            {
                logger.Error(ex);
                strError = ex.Message;
            }

            return(strError);
        }
コード例 #3
0
        public string InsertProductGroupLevel1(PRO_tblProductGroupLevel1DTO item)
        {
            string strError = "";

            strError = db.sExecuteSQL("PRO_spfrmProductGroupLevel1", new string[] { "Activity", "Username", "LanguageID", "Level1ID", "Level1Code", "Level1ShortCode", "VNName", "ENName", "Rank", "Used", "Note", "Description" }, new object[] { item.Activity, item.Username, item.LanguageID, item.Level1ID, item.Level1Code, item.Level1ShortCode, item.VNName, item.ENName, item.Rank, item.Used, item.Note, item.Description });

            if (strError.Equals(""))
            {
                strError = this.InsertActionLog(new DTO.System.SYS_tblActionLogDTO
                {
                    Activity      = item.Activity,
                    Username      = item.Username,
                    LanguageID    = item.LanguageID,
                    ActionVN      = "Thêm Mới",
                    ActionEN      = "Insert",
                    FunctionID    = "20",
                    DescriptionVN = string.Format("Tài khoản '{0}' vừa thêm mới thành công ngành hàng có mã '{1}'.", item.Username, item.Level1Code),
                    DescriptionEN = string.Format("Account '{0}' has inserted new product sector successfully with sector code is '{1}'.", item.Username, item.Level1Code)
                });
            }

            return(strError);
        }
コード例 #4
0
 public string UpdateProductGroupLevel1(PRO_tblProductGroupLevel1DTO item)
 {
     return(daoLevel1.UpdateProductGroupLevel1(item));
 }
コード例 #5
0
 public string InsertProductGroupLevel1(PRO_tblProductGroupLevel1DTO item)
 {
     return(daoLevel1.InsertProductGroupLevel1(item));
 }