/// <summary> /// 일자별 처리현황 - CHART /// </summary> /// <returns></returns> private DataSet GetSP_DAY_RSLT_CHRT_INQ() { #region 라메터 변수 선언 및 값 할당 DataSet dsRtnValue = null; var strProcedureName = "PK_A1005_SRT.SP_DAY_RSLT_CHRT_INQ"; Dictionary <string, object> dicInputParam = new Dictionary <string, object>(); string[] arrOutputParam = { "O_DAY_RSLT_CHRT", "O_RSLT" }; var strCntrCd = this.BaseClass.CenterCD; var strEqpId = this.BaseClass.ComboBoxSelectedKeyValue(this.CboSrt); var strFromDt = this.FromDT.DateTime.ToString("yyyyMMdd"); var strToDt = this.ToDT.DateTime.ToString("yyyyMMdd"); var strErrCode = string.Empty; var strErrMsg = string.Empty; #endregion #region Input 파라메터 dicInputParam.Add("P_CNTR_CD", strCntrCd); dicInputParam.Add("P_EQP_ID", strEqpId); dicInputParam.Add("P_FM_YMD", strFromDt); dicInputParam.Add("P_TO_YMD", strToDt); #endregion #region 데이터 조회 using (BaseDataAccess dataAccess = new BaseDataAccess()) { dsRtnValue = dataAccess.GetSpDataSet(strProcedureName, dicInputParam, arrOutputParam); } #endregion return(dsRtnValue); }
/// <summary> /// 설비 관리 데이터조회 /// </summary> private DataSet GetSP_EQP_LIST_INQ() { #region 라메터 변수 선언 및 값 할당 DataSet dsRtnValue = null; var strProcedureName = "UI_EQIP_MST_INQ"; Dictionary <string, object> dicInputParam = new Dictionary <string, object>(); var strEqpID = this.txtEqpId_First.Text.Trim(); // 설비 ID var strEqpNm = this.txtEqpNm_First.Text.Trim(); // 설비 명 var strEqpTypeCd = this.BaseClass.ComboBoxSelectedKeyValue(this.cboEqpTypeCd); // 설비 종류 코드 var strUseYn = this.BaseClass.ComboBoxSelectedKeyValue(this.cboUseYN); // 사용 여부 var strErrCode = string.Empty; // 오류 코드 var strErrMsg = string.Empty; // 오류 메세지 #endregion #region Input 파라메터 dicInputParam.Add("EQP_ID", strEqpID); // 설비 ID dicInputParam.Add("EQP_NM", strEqpNm); // 설비 명 dicInputParam.Add("EQP_TYPE_CD", strEqpTypeCd); // 설비 종류 코드 dicInputParam.Add("USE_YN", strUseYn); // 사용 여부 #endregion #region 데이터 조회 using (BaseDataAccess dataAccess = new BaseDataAccess()) { dsRtnValue = dataAccess.GetSpDataSet(strProcedureName, dicInputParam); } #endregion return(dsRtnValue); }
public ActionResult Edit([Bind(Include = "postID,postCategoryID,title,content,active,createDate,createUser,updateDate,updateUser")] Post post) { try { if (DataUtil.Validation()) { if (ModelState.IsValid) { db.Entry(post).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.postCategoryID = new SelectList(db.PostCategory, "postCategoryID", "name", post.postCategoryID); return(View(post)); } else { return(RedirectToAction("Login", "Home")); } } catch (Exception ex) { Error objError = new Error(); objError.page = "Post"; objError.option = "Edit-2"; objError.date = DateTime.Now; objError.description = ex.Message; BaseDataAccess <Error> baseDataAccess = new BaseDataAccess <Error>(); baseDataAccess.Insert(objError); return(RedirectToAction("Error", "Home")); } }
// GET: /User/Edit/5 public ActionResult Edit(int?id) { try { if (DataUtil.Validation()) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } User user = db.User.Find(id); if (user == null) { return(HttpNotFound()); } return(PartialView(user)); } else { return(RedirectToAction("Login", "Home")); } } catch (Exception ex) { Error objError = new Error(); objError.page = "Users"; objError.option = "Edit-1"; objError.date = DateTime.Now; objError.description = ex.Message; BaseDataAccess <Error> baseDataAccess = new BaseDataAccess <Error>(); baseDataAccess.Insert(objError); return(RedirectToAction("Error", "Home")); } }
public static void Init() { Servers = new List <Models.Servers>(); List <byte> levels = new List <byte>(); #region Read Configuration File //Read config file //Configuration is set up on DefaultConnection string in this case BaseDataAccess DataBase = new BaseDataAccess("Data Source=localhost,8758;Initial Catalog=configuration;Integrated Security=False;User Id=tijan;Password=tijan99;MultipleActiveResultSets=True"); using (DataSet ConfigData = DataBase.ExecuteFillDataSet("select slave_id, concat('Data Source=localhost,', db_port, ';Initial Catalog=', database_name, ';Integrated Security=False;User Id=', username, ';Password='******';MultipleActiveResultSets=True') as database_connection_string, concat('http://', server_name, ':', api_port) as api_call, api_port, server_level, main_table FROM slaves WHERE is_using = 'true';", null)) { foreach (DataRow row in ConfigData.Tables[0].Rows) { Servers.Add(new Models.Servers { slave_id = Convert.ToInt16(row["slave_id"]), //smallint to int database_connection_string = row["database_connection_string"].ToString(), //string to string api_call = row["api_call"].ToString(), //string to string api_port = Convert.ToInt16(row["api_port"]), //smallint to int server_level = (byte)row["server_level"], //tinyint to int main_table = row["main_table"].ToString() //string to string }); levels.Add((byte)row["server_level"]); } } #endregion }
public ActionResult Login(User objUser) { try { //var user = db.User.FirstOrDefault(u => u.username == objUser.username && u.password == objUser.password && u.active == true); var user = (from x in db.User where x.username == objUser.username && x.password == objUser.password && x.active == true select x).FirstOrDefault(); if (user != null) { user.messageWelcome = "Bienvenido(a) " + user.name + " " + user.lastname; Session["USR_SESSION"] = user; return(RedirectToAction("Index", "Home")); } else { objUser.result = 1; } return(View(objUser)); } catch (Exception ex) { Error objError = new Error(); objError.page = "Home"; objError.option = "Login-2"; objError.date = DateTime.Now; objError.description = ex.Message; BaseDataAccess <Error> baseDataAccess = new BaseDataAccess <Error>(); baseDataAccess.Insert(objError); return(RedirectToAction("Error", "Home")); } }
// GET: /User/Create public ActionResult Create() { try { if (DataUtil.Validation()) { return(PartialView()); } else { return(RedirectToAction("Login", "Home")); } } catch (Exception ex) { Error objError = new Error(); objError.page = "Users"; objError.option = "Create-1"; objError.date = DateTime.Now; objError.description = ex.Message; BaseDataAccess <Error> baseDataAccess = new BaseDataAccess <Error>(); baseDataAccess.Insert(objError); return(RedirectToAction("Error", "Home")); } }
/// <summary> /// 최적화 결과 조회 (최대 셀수와 마스터의 물리 셀수 그래프 비교) /// </summary> /// <returns></returns> private async Task <DataSet> GetSP_OPT_CELL_QTY_RSLT_INQ() { #region 라메터 변수 선언 및 값 할당 DataSet dsRtnValue = null; var strProcedureName = "PK_O1005_QPS.SP_OPT_CELL_QTY_RSLT_INQ"; Dictionary <string, object> dicInputParam = new Dictionary <string, object>(); string[] arrOutputParam = { "O_OPT_CELL_QTY_RSLT", "O_OPT_CELL_MAX_RSLT", "O_RTN_RSLT" }; var strCenterCD = this.BaseClass.CenterCD; // 센터코드 var strDataSetID = this.BaseClass.ComboBoxSelectedKeyValue(this.cboDataSetID); // 데이터 그룹 var iOptSeq = this.BaseClass.ComboBoxSelectedKeyValue(this.cboCellOptSeq); // 셀 최적화 차수 #endregion #region Input 파라메터 dicInputParam.Add("P_CNTR_CD", strCenterCD); // 센터코드 dicInputParam.Add("P_DATA_SET_ID", strDataSetID); // 데이터 그룹 dicInputParam.Add("P_OPT_SEQ", iOptSeq); // 최적화 차수 #endregion #region 데이터 조회 using (BaseDataAccess dataAccess = new BaseDataAccess()) { await System.Threading.Tasks.Task.Run(() => { dsRtnValue = dataAccess.GetSpDataSet(strProcedureName, dicInputParam, arrOutputParam); }).ConfigureAwait(true); } #endregion return(dsRtnValue); }
/// <summary> /// ROC 정보 조회 /// </summary> /// <returns></returns> private async Task <DataSet> GetSP_QPS_ROC_SET_INQ(string OptTypeCD) { #region 라메터 변수 선언 및 값 할당 DataSet dtRtnValue = null; var strProcedureName = "PK_O1001_QPS.SP_QPS_ROC_SET_INQ"; Dictionary <string, object> dicInputParam = new Dictionary <string, object>(); string[] arrOutputParam = { "O_QPS_ROC_SET_LIST", "O_RTN_RSLT" }; var strCenterCD = this.BaseClass.CenterCD; // 센터코드 var strOptTypeCD = OptTypeCD; // 최적화 타입 var strWrkPlanYmd = this.BaseClass.GetCalendarValue(this.deWrkPlanWmd); // 출고일자 var strDataSetId = this.BaseClass.ComboBoxSelectedKeyValue(this.cboDataSetID); // DataSetID #endregion #region Input 파라메터 dicInputParam.Add("P_CNTR_CD", strCenterCD); // 센터코드 dicInputParam.Add("P_OPT_TYPE_CD", strOptTypeCD); // 최적화 타입 dicInputParam.Add("P_WRK_PLAN_YMD", strWrkPlanYmd); // 출고일자 dicInputParam.Add("P_DATA_SET_ID", strDataSetId); // DataSetID #endregion #region 데이터 조회 using (BaseDataAccess da = new BaseDataAccess()) { await System.Threading.Tasks.Task.Run(() => { dtRtnValue = da.GetSpDataSet(strProcedureName, dicInputParam, arrOutputParam); }).ConfigureAwait(true); } #endregion return(dtRtnValue); }
/// <summary> /// Chute 수정 /// </summary> /// <param name="_da">DataAccess 객체</param> /// <param name="_item">저장 대상 아이템 (Row 데이터)</param> /// <returns></returns> private async Task <bool> UpdateSP_CHUTE_UPD(BaseDataAccess _da, ChuteMgmt _item) { bool isRtnValue = true; #region 라메터 변수 선언 및 값 할당 DataTable dtRtnValue = null; var strProcedureName = "UI_CHUTE_MST_UPD"; Dictionary <string, object> dicInputParam = new Dictionary <string, object>(); Dictionary <object, BaseEnumClass.MSSqlOutputDataType> dicOutPutParam = new Dictionary <object, BaseEnumClass.MSSqlOutputDataType>(); Dictionary <object, object> dicRtnValue = new Dictionary <object, object>(); string strEqpID = _item.EQP_ID; // 설비 ID string strChuteId = _item.CHUTE_ID; // 슈트 ID string strChuteNm = _item.CHUTE_NM; // CHUTE_NM string strFinalChuteId = _item.FINAL_CHUTE_ID; // 최종 합류 슈트 int intChuteAllocPrty = _item.CHUTE_ALLOC_PRTY; // 슈트 우선 순위 string strPlcChuteId = _item.PLC_CHUTE_ID; // PLC_CHUTE_ID string strChuteTypeCd = _item.CHUTE_TYPE_CD; // 슈트 종류 코드 string strChuteUseCd = _item.CHUTE_USE_CD; // 슈트 사용 형태 string strZONE_ID = _item.ZONE_ID; // ZONE_ID string strUseYN = _item.Checked == true ? "Y" : "N"; // 사용 여부 string strUserID = this.BaseClass.UserID; // 사용자 ID #endregion #region Input 파라메터 dicInputParam.Add("EQP_ID", strEqpID); // 설비 ID dicInputParam.Add("CHUTE_ID", strChuteId); // 슈트 ID dicInputParam.Add("CHUTE_NM", strChuteNm); // CHUTE_NM dicInputParam.Add("FINAL_CHUTE_ID", strFinalChuteId); // CHUTE_NM dicInputParam.Add("CHUTE_ALLOC_PRTY", intChuteAllocPrty); // CHUTE_NM dicInputParam.Add("PLC_CHUTE_ID", strPlcChuteId); // PLC_CHUTE_ID dicInputParam.Add("CHUTE_TYPE_CD", strChuteTypeCd); // CHUTE_NM dicInputParam.Add("CHUTE_USE_CD", strChuteUseCd); // CHUTE_USE_CD dicInputParam.Add("ZONE_ID", strZONE_ID); // ZONE_ID dicInputParam.Add("USE_YN", strUseYN); // 사용 여부 dicInputParam.Add("USER_ID", strUserID); // 사용자 ID #endregion #region + Output 파라메터 dicOutPutParam.Add("RTN_VAL", BaseEnumClass.MSSqlOutputDataType.INT32); dicOutPutParam.Add("RTN_MSG", BaseEnumClass.MSSqlOutputDataType.VARCHAR); #endregion #region + 데이터 조회 await System.Threading.Tasks.Task.Run(() => { dtRtnValue = _da.GetSpDataTable(strProcedureName, dicInputParam, dicOutPutParam, ref dicRtnValue); }).ConfigureAwait(true); #endregion if (dicRtnValue["RTN_VAL"].ToString().Equals("0") == false) { var strMessage = dicRtnValue["RTN_MSG"].ToString(); this.BaseClass.MsgError(strMessage, BaseEnumClass.CodeMessage.MESSAGE); isRtnValue = false; } return(isRtnValue); }
protected void Application_Start() { AreaRegistration.RegisterAllAreas(); FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); RouteConfig.RegisterRoutes(RouteTable.Routes); BundleConfig.RegisterBundles(BundleTable.Bundles); string connStr = ConfigurationManager.ConnectionStrings["connStr"].ConnectionString; BaseDataAccess.SetConnectionString(connStr); if (ConfigurationManager.AppSettings["production"] == "true") { var refreshQuotesFromInvestingComThread = new System.Threading.Thread(P.RefreshQuotesFromInvestingCom); refreshQuotesFromInvestingComThread.Start(); var refreshQuotesFromCbr = new System.Threading.Thread(P.RefreshQuotesFromCbr); refreshQuotesFromCbr.Start(); var refreshQuotesFromLme = new System.Threading.Thread(P.RefreshQuotesFromLme); refreshQuotesFromLme.Start(); var recalculateUserRatings = new System.Threading.Thread(UserHelper.RecalculateUserRatings); recalculateUserRatings.Start(); } var sendExpiredAdAndOffersMessage = new System.Threading.Thread(AdsController.SendExpiredAdAndOffersNotificationMessage); sendExpiredAdAndOffersMessage.Start(); }
/// <summary> /// 슈트 관리 데이터 조회 /// </summary> private DataSet GetSP_CHUTE_LIST_INQ() { #region 라메터 변수 선언 및 값 할당 DataSet dsRtnValue = null; var strProcedureName = "UI_CHUTE_MST_INQ"; Dictionary <string, object> dicInputParam = new Dictionary <string, object>(); string strEqpId = this.BaseClass.ComboBoxSelectedKeyValue(this.cboEqpId); // 설비 ID string strChuteId = this.txtChuteId.Text.Trim(); // 슈트 ID string strChuteNm = this.txtChuteNm.Text.Trim(); // 슈트 NAME string strChuteTypeCd = this.BaseClass.ComboBoxSelectedKeyValue(this.cboChuteTypeCd); // 슈트용도코드 string strUseYn = this.BaseClass.ComboBoxSelectedKeyValue(this.cboUseYN); // 사용 여부 string strFinalChuteId = this.txtFinalChuteId.Text.Trim(); // 최종 합류 슈트 #endregion #region Input 파라메터 dicInputParam.Add("EQP_ID", strEqpId); // 설비 ID dicInputParam.Add("CHUTE_ID", strChuteId); // 슈트 ID dicInputParam.Add("CHUTE_NM", strChuteNm); // 슈트 NAME dicInputParam.Add("CHUTE_TYPE_CD", strChuteTypeCd); // 슈트용도코드 dicInputParam.Add("USE_YN", strUseYn); // 사용 여부 dicInputParam.Add("FINAL_CHUTE_ID", strFinalChuteId); // 최종 합류 슈트 #endregion #region 데이터 조회 using (BaseDataAccess dataAccess = new BaseDataAccess()) { dsRtnValue = dataAccess.GetSpDataSet(strProcedureName, dicInputParam); } #endregion return(dsRtnValue); }
/// <summary> /// 공지사항 정보를 조회한다. /// </summary> /// <returns></returns> /// private DataSet GetNoticeList() { try { #region 라메터 변수 선언 및 값 할당 DataSet dsRtnValue = null; var strProcedureName = "PK_C1000.SP_NOTICE_TALLY_INQ"; Dictionary <string, object> dicInputParam = new Dictionary <string, object>(); string[] arrOutputPram = { "O_NEW_NOTICE_RSLT", "O_RSLT" }; #endregion #region Input 파라메터 var strCenterCD = this.BaseClass.ComboBoxSelectedKeyValue(this.cboCenter); var strUserID = this.txtUserID.Text.Trim(); var strDateTime = DateTime.Now.ToString("yyyyMMdd"); #endregion dicInputParam.Add("P_CNTR_CD", strCenterCD); // 센터 코드 dicInputParam.Add("P_USER_ID", strUserID); // 사용자 ID dicInputParam.Add("P_DATE", strDateTime); // 오늘날짜 (yyyymmdd) using (BaseDataAccess dataAccess = new BaseDataAccess()) { dsRtnValue = dataAccess.GetSpDataSet(strProcedureName, dicInputParam, arrOutputPram); } return(dsRtnValue); } catch { throw; } }
/// <summary> /// 메뉴 정보를 조회한다. /// </summary> /// <returns></returns> private DataSet GetMenuList() { try { #region 라메터 변수 선언 및 값 할당 DataSet dsRtnValue = null; var strProcedureName = "PK_C1000.SP_MENU_LIST_INQ"; Dictionary <string, object> dicInputParam = new Dictionary <string, object>(); string[] arrOutputParam = { "O_MENU_LIST", "O_USER_INFO_LIST", "O_RSLT" }; #endregion #region Input 파라메터 var strCenterCD = this.BaseClass.ComboBoxSelectedKeyValue(this.cboCenter); var strUserID = this.txtUserID.Text.Trim(); #endregion dicInputParam.Add("P_CNTR_CD", strCenterCD); // 센터 코드 dicInputParam.Add("P_USER_ID", strUserID); // 사용자 ID using (BaseDataAccess dataAccess = new BaseDataAccess()) { dsRtnValue = dataAccess.GetSpDataSet(strProcedureName, dicInputParam, arrOutputParam); } return(dsRtnValue); } catch { throw; } }
/// <summary> /// 엑셀 업로드 슈트 매핑 리스트 조회 /// </summary> /// <returns></returns> private async Task <DataSet> GetSP_CHUTE_PLAN_UPLD_LIST_INQ() { #region 라메터 변수 선언 및 값 할당 DataSet dsRtnValue = null; var strProcedureName = "PK_P1008_SRT.SP_CHUTE_PLAN_UPLD_LIST_INQ"; Dictionary <string, object> dicInputParam = new Dictionary <string, object>(); string[] arrOutputParam = { "O_UPLD_LIST", "O_RSLT" }; var strCenterCD = this.BaseClass.CenterCD; // 센터코드 var strSuccType = this.BaseClass.ComboBoxSelectedKeyValue(this.cboSuccYN); // 성공 여부 var strUserID = this.BaseClass.UserID; #endregion #region Input 파라메터 dicInputParam.Add("P_CNTR_CD", strCenterCD); // 센터코드 dicInputParam.Add("P_EQP_ID", this.g_strEqpID); // 설비 ID dicInputParam.Add("P_UPLD_NO", this.g_strUploadNo); // 엑셀 업로드 번호 dicInputParam.Add("P_USER_ID", strUserID); // 사용자 ㅑㅇ dicInputParam.Add("P_PROC_RSLT_CD", strSuccType); // 성공 여부 #endregion #region 데이터 조회 using (BaseDataAccess dataAccess = new BaseDataAccess()) { await System.Threading.Tasks.Task.Run(() => { dsRtnValue = dataAccess.GetSpDataSet(strProcedureName, dicInputParam, arrOutputParam); }).ConfigureAwait(true); } #endregion return(dsRtnValue); }
public static DataTable GetDate_INIT_INQ() { try { BaseClass BaseClass = new BaseClass(); #region 라메터 변수 선언 및 값 할당 DataTable dtRtnValue = null; var strProcedureName = "PK_C1000.SP_DATE_INIT_INQ"; Dictionary <string, object> dicInputParam = new Dictionary <string, object>(); string[] arrOutputParam = { "O_DATE_INIT_LIST", "O_RSLT" }; #endregion #region Input 파라메터 var strCenterCD = BaseClass.CenterCD; dicInputParam.Add("P_CNTR_CD", strCenterCD); // 센터 코드 #endregion using (BaseDataAccess dataAccess = new BaseDataAccess()) { dtRtnValue = dataAccess.GetSpDataTable(strProcedureName, dicInputParam, arrOutputParam); } return(dtRtnValue); } catch { throw; } }
public ActionResult Recover(User objUser) { try { User oUser = new User(); oUser = db.User.FirstOrDefault(u => u.username.ToUpper() == objUser.username.ToUpper()); if (oUser != null) { DataUtil.SendMail("Estimado usuario(a), su contraseña es: " + oUser.password, "Recuperación de contraseña", oUser.email, ""); objUser.result = 1; } else { objUser.result = 2; } return(View(objUser)); } catch (Exception ex) { Error objError = new Error(); objError.page = "Home"; objError.option = "Recover-2"; objError.date = DateTime.Now; objError.description = ex.Message; BaseDataAccess <Error> baseDataAccess = new BaseDataAccess <Error>(); baseDataAccess.Insert(objError); return(RedirectToAction("Error", "Home")); } }
private List <Contact> GetExistingContacts(int personId) { List <Contact> contactsToReturn = new List <Contact>(); Person_Contact xref = new Person_Contact(_databaseSmoObjectsAndSettings); xref.PersonID = personId; BaseDataAccess <Person_Contact> xrefDAO = new BaseDataAccess <Person_Contact>(_databaseSmoObjectsAndSettings); //this get permutation will check the modified state of each property in the dto //if modified it is added to the exact criteria list in this case just the personID List <Person_Contact> thisPersonsContacts = xrefDAO.Get(xref, GetPermutations.ByExplicitCriteria); foreach (Person_Contact person_contact in thisPersonsContacts) { Bo.Contact contact = new Bo.Contact(_databaseSmoObjectsAndSettings); contact.ContactID = person_contact.ContactID; contact.GetByPrimaryKey(); contactsToReturn.Add(contact); } return(contactsToReturn); }
// GET: /User/ public ActionResult Index() { try { if (DataUtil.Validation()) { return(View(db.User.ToList().OrderBy(x => x.name))); } else { return(RedirectToAction("Login", "Home")); } } catch (Exception ex) { Error objError = new Error(); objError.page = "Users"; objError.option = "Index"; objError.date = DateTime.Now; objError.description = ex.Message; BaseDataAccess <Error> baseDataAccess = new BaseDataAccess <Error>(); baseDataAccess.Insert(objError); return(RedirectToAction("Error", "Home")); } }
private List <Address> GetExistingAddresses(int personId) { List <Address> addressesToReturn = new List <Address>(); Person_Address xref = new Person_Address(_databaseSmoObjectsAndSettings); xref.PersonID = personId; BaseDataAccess <Person_Address> xrefDAO = new BaseDataAccess <Person_Address>(_databaseSmoObjectsAndSettings); //this get permutation will check the modified state of each property in the dto //if modified it is added to the exact criteria list in this case just the personID List <Person_Address> thisPersonsAddresses = xrefDAO.Get(xref, GetPermutations.ByExplicitCriteria); foreach (Person_Address person_address in thisPersonsAddresses) { Bo.Address address = new Bo.Address(_databaseSmoObjectsAndSettings); address.AddressID = person_address.AddressID; address.GetByPrimaryKey(); addressesToReturn.Add(address); } return(addressesToReturn); }
public ActionResult Profile() { try { if (DataUtil.Validation()) { User user = db.User.Find(Helper.GetCurrentUser().userID); user.imageURL = Helper.GetCurrentUserLogo(); if (user == null) { return(HttpNotFound()); } return(View(user)); } else { return(RedirectToAction("Login", "Home")); } } catch (Exception ex) { Error objError = new Error(); objError.page = "Users"; objError.option = "Profile-1"; objError.date = DateTime.Now; objError.description = ex.Message; BaseDataAccess <Error> baseDataAccess = new BaseDataAccess <Error>(); baseDataAccess.Insert(objError); return(RedirectToAction("Error", "Home")); } }
internal bool DoesCustomerExist(int personID) { bool doesCustomerExist = false; //instantiate DAO BaseDataAccess <Dto.Person> personDAO = new BaseDataAccess <Dto.Person>(_databaseSmoObjectsAndSettings); //instantiate dto Dto.Person personDTO = new Dto.Person(); Bo.Person personToReturn = new Bo.Person(_databaseSmoObjectsAndSettings); //set the property, in this case we are going to use this as the search criteria personDTO.PersonID = personID; //we know that the criteria that we set is the primary key of the database table, so //choose that as the search permutation List <Dto.Person> listOfPersons = personDAO.Get(personDTO, GetPermutations.ByPrimaryKey); if (listOfPersons.Count > 0) { doesCustomerExist = true; } return(doesCustomerExist); }
/// <summary> /// 백업리스트 조회 /// </summary> /// <returns></returns> private DataSet GetSP_BACKUP_LIST_INQ() { try { #region 라메터 변수 선언 및 값 할당 DataSet dsRtnValue = null; var strProcedureName = "PK_C1027.SP_BACKUP_LIST_INQ"; Dictionary <string, object> dicInputParam = new Dictionary <string, object>(); string[] arrOutputParam = { "O_BACKUP_LIST", "O_RSLT" }; var strTableName = this.txtTableName.Text.Trim(); // 테이블명 var strErrCode = string.Empty; // 오류 코드 var strErrMsg = string.Empty; // 오류 메세지 #endregion #region Input 파라메터 dicInputParam.Add("P_TB_NM", strTableName); // 테이블명 #endregion #region 데이터 조회 using (BaseDataAccess dataAccess = new BaseDataAccess()) { dsRtnValue = dataAccess.GetSpDataSet(strProcedureName, dicInputParam, arrOutputParam); } #endregion return(dsRtnValue); } catch { throw; } }
/// <summary> /// 바코드 정규식 조회 /// </summary> private DataSet GetSP_BCD_REGEX_INQ() { #region 라메터 변수 선언 및 값 할당 DataSet dsRtnValue = null; var strProcedureName = "PK_C1024_SRT.SP_BCD_REGEX_INQ"; Dictionary <string, object> dicInputParam = new Dictionary <string, object>(); string[] arrOutputParam = { "O_BCD_REGEX_LIST", "O_RSLT" }; var strCntrCd = this.BaseClass.CenterCD; // 센터 코드 var strEqpId = this.BaseClass.ComboBoxSelectedKeyValue(this.CboSrt); //설비 ID var strErrCode = string.Empty; // 오류 코드 var strErrMsg = string.Empty; // 오류 메세지 #endregion #region Input 파라메터 dicInputParam.Add("P_CNTR_CD", strCntrCd); // 센터 코드 dicInputParam.Add("P_EQP_ID", strEqpId); //설비 ID #endregion #region 데이터 조회 using (BaseDataAccess dataAccess = new BaseDataAccess()) { dsRtnValue = dataAccess.GetSpDataSet(strProcedureName, dicInputParam, arrOutputParam); } #endregion return(dsRtnValue); }
/// <summary> /// 선택한 그리드의 Row를 삭제한다. (행추가된 항목만 삭제 가능) /// </summary> private void DeleteGridRowItem() { //var liEquipmentMgnt = this.EquipmentMgntList.Where(p => p.IsSelected == true && p.IsNew == true && p.IsSaved == false).ToList(); //if (liEquipmentMgnt.Count() <= 0) //{ // BaseClass.MsgError("ERR_DELETE"); //} //liEquipmentMgnt.ForEach(p => EquipmentMgntList.Remove(p)); if (this.EquipmentMgntList.Where(p => p.IsSelected == true && p.IsNew == false).Count() > 0) { this.BaseClass.MsgQuestion("ASK_DEL_DB"); if (this.BaseClass.BUTTON_CONFIRM_YN == false) { return; } } this.EquipmentMgntList.Where(p => p.IsSelected == true).ToList().ForEach(p => { if (p.IsNew != true) { p.Checked = false; using (BaseDataAccess da = new BaseDataAccess()) { this.UpdateSP_EQP_UPD(da, p).Wait(); } } this.EquipmentMgntList.Remove(p); }); }
/// <summary> /// 거래처를 조회한다. /// </summary> /// <returns></returns> private async Task <DataSet> GetCOMM_SHIP_POPUP_SEARCH() { #region 라메터 변수 선언 및 값 할당 DataSet dsRtnValue = null; var strProcedureName = "PK_C1011.SP_SHIP_TO_LIST_INQ"; Dictionary <string, object> dicInputParam = new Dictionary <string, object>(); string[] arrOutputParam = { "O_SHIP_TO_LIST", "O_RSLT" }; var strShipCD = this.txtShipCD.Text.Trim(); // 거래처 코드 var strShipNM = this.txtShipNM.Text.Trim(); // 거래처명 var strCstCD = this.txtCstCD.Text.Trim(); // 고객사 코드 var strCstNM = this.txtCstNM.Text.Trim(); // 고객사 명 var strUseYN = "Y"; // 사용 여부 #endregion #region Input 파라메터 dicInputParam.Add("P_CST_CD", strCstCD); // 고객사 코드 dicInputParam.Add("P_CST_NM", strCstNM); // 고객사 명 dicInputParam.Add("P_USE_YN", strUseYN); // 사용여부 #endregion #region 데이터 조회 using (BaseDataAccess dataAccess = new BaseDataAccess()) { await System.Threading.Tasks.Task.Run(() => { dsRtnValue = dataAccess.GetSpDataSet(strProcedureName, dicInputParam, arrOutputParam); }).ConfigureAwait(true); } #endregion return(dsRtnValue); }
// GET: Posts/Edit/5 public ActionResult Edit(int?id) { try { if (DataUtil.Validation()) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Post post = db.Post.Find(id); if (post == null) { return(HttpNotFound()); } ViewBag.postCategoryID = new SelectList(db.PostCategory, "postCategoryID", "name", post.postCategoryID); return(PartialView(post)); } else { return(RedirectToAction("Login", "Home")); } } catch (Exception ex) { Error objError = new Error(); objError.page = "Post"; objError.option = "Edit-1"; objError.date = DateTime.Now; objError.description = ex.Message; BaseDataAccess <Error> baseDataAccess = new BaseDataAccess <Error>(); baseDataAccess.Insert(objError); return(RedirectToAction("Error", "Home")); } }
/// <summary> /// IP List 조회 /// </summary> /// <returns></returns> private DataSet GetSP_IP_LIST_INQ() { #region 라메터 변수 선언 및 값 할당 DataSet dsRtnValue = null; var strProcedureName = "PK_C1025.SP_IP_LIST_INQ"; Dictionary <string, object> dicInputParam = new Dictionary <string, object>(); string[] arrOutputParam = { "O_IP_LIST", "O_RSLT" }; var strCenterCD = this.BaseClass.CenterCD; // 센터코드 var strIpNo = this.txtIpNo.Text.Trim(); // IP NO var strErrCode = string.Empty; // 오류 코드 var strErrMsg = string.Empty; // 오류 메세지 #endregion #region Input 파라메터 dicInputParam.Add("P_CNTR_CD", strCenterCD); // 센터코드 dicInputParam.Add("P_IP_NO", strIpNo); // IP_NO #endregion #region 데이터 조회 using (BaseDataAccess dataAccess = new BaseDataAccess()) { dsRtnValue = dataAccess.GetSpDataSet(strProcedureName, dicInputParam, arrOutputParam); } #endregion return(dsRtnValue); }
// GET: Posts public ActionResult Index() { try { if (DataUtil.Validation()) { var post = db.Post.Include(p => p.postCategory); return(View(post.ToList())); } else { return(RedirectToAction("Login", "Home")); } } catch (Exception ex) { Error objError = new Error(); objError.page = "Post"; objError.option = "Index"; objError.date = DateTime.Now; objError.description = ex.Message; BaseDataAccess <Error> baseDataAccess = new BaseDataAccess <Error>(); baseDataAccess.Insert(objError); return(RedirectToAction("Error", "Home")); } }
/// <summary> /// Common Code Detail List 조회 SP /// </summary> /// <param name="_strHeaderJobNo">Job 번호</param> /// <param name="_strHeaderJobID">Job ID</param> /// <returns></returns> private DataSet GetSP_BTCH_JOB_DTL_LIST_INQ(string _strHeaderJobNo, string _strHeaderJobID) { #region 라메터 변수 선언 및 값 할당 DataSet dsRtnValue = null; var strProcedureName = "PK_C1008.SP_BTCH_JOB_DTL_LIST_INQ"; Dictionary <string, object> dicInputParam = new Dictionary <string, object>(); string[] arrOutputParam = { "O_BTCH_JOB_DTL_LIST", "O_RSLT" }; var strCntrCd = this.BaseClass.CenterCD; // 센터코드 var strHdrJobNo = _strHeaderJobNo; // Job 번호 var strHdrJobID = _strHeaderJobID; // Job ID #endregion #region Input 파라메터 dicInputParam.Add("P_CNTR_CD", strCntrCd); // 센터코드 dicInputParam.Add("P_JOB_NO", strHdrJobNo); // Job 번호 dicInputParam.Add("P_JOB_ID", strHdrJobID); // Job ID #endregion #region 데이터 조회 using (BaseDataAccess dataAccess = new BaseDataAccess()) { dsRtnValue = dataAccess.GetSpDataSet(strProcedureName, dicInputParam, arrOutputParam); } #endregion return(dsRtnValue); }