public PRO_tblProductGroupLevel3DTO GetDataByID(string username, string language_id, string level3_id) { PRO_tblProductGroupLevel3DTO result = new PRO_tblProductGroupLevel3DTO(); try { DataTable data = db.GetDataTable("PRO_spfrmProductGroupLevel3", new string[] { "Activity", "Username", "LanguageID", "Level3ID" }, new object[] { BaseConstant.COMMAND_GET_DATA_BY_ID_EN, username, language_id, level3_id }); if (data != null && data.Rows.Count > 0) { result = ConvertEngine.ConvertDataTableToObjectList<PRO_tblProductGroupLevel3DTO>(data)[0]; return result; } } catch (Exception ex) { logger.Error(ex); } return result; }
public string InsertLevel3(PRO_tblProductGroupLevel3DTO item) { string strError = ""; try { strError = db.sExecuteSQL("PRO_spfrmProductGroupLevel3", new string[] { "Activity", "Username", "LanguageID", "Level3Code", "Level3ShortCode", "Level1ID", "Level2ID", "VNName", "ENName", "Rank", "Used", "Note", "Description" }, new object[] { item.Activity, item.UserID, item.LanguageID, item.Level3Code, item.Level3ShortCode, item.Level1ID, item.Level2ID, 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; }