public bool ChangeBaseSort(string biz_type, bool sort_up, int emp_ref_id, int reg_user) { bool rtnValue = false; this.Transaction_Message = ""; IDbConnection conn = DbAgentHelper.CreateDbConnection(); conn.Open(); IDbTransaction trx = conn.BeginTransaction(); try { rtnValue = base.ChangeBaseSort(conn, trx, biz_type, sort_up, emp_ref_id, reg_user); trx.Commit(); } catch (Exception ex) { trx.Rollback(); this.Transaction_Message = ex.Message.Replace("\\r", ""); } finally { conn.Close(); conn.Dispose(); } return(rtnValue); }
public bool DeleteWorkMap(int estterm_ref_id, int est_dept_ref_id, int stg_ref_id, DataTable dtDel) { bool rtnValue = false; IDbConnection conn = DbAgentHelper.CreateDbConnection(); conn.Open(); IDbTransaction trx = conn.BeginTransaction(); try { rtnValue = base.DeleteWorkMap(conn, trx, estterm_ref_id, est_dept_ref_id, stg_ref_id, dtDel); if (rtnValue) { trx.Commit(); } else { trx.Rollback(); } } catch (Exception ex) { trx.Rollback(); } finally { conn.Close(); } return(rtnValue); }
public bool RemoveCtrlEstMap(DataTable dataTable) { int affectedRow = 0; IDbConnection conn = DbAgentHelper.CreateDbConnection(); conn.Open(); IDbTransaction trx = conn.BeginTransaction(); try { foreach (DataRow dataRow in dataTable.Rows) { affectedRow += _ctrlEstMap.Delete(conn , trx , DataTypeUtility.GetValue(dataRow["CTRL_ID"]) , DataTypeUtility.GetValue(dataRow["EST_ID"])); } trx.Commit(); } catch (Exception ex) { trx.Rollback(); return(false); } finally { conn.Close(); } return((affectedRow > 0) ? true : false); }
public bool Modify_Emp_Info(int emp_ref_id, string emp_email, string cell_phone, int update_user_ref_id) { IDbConnection conn = DbAgentHelper.CreateDbConnection(); conn.Open(); IDbTransaction trx = conn.BeginTransaction(); int affectedRow = 0; try { affectedRow = _data.Update_Emp_Info(conn, trx, emp_ref_id, emp_email, cell_phone, update_user_ref_id); trx.Commit(); } catch (Exception ex) { trx.Rollback(); affectedRow = 0; } finally { conn.Close(); } return affectedRow > 0 ? true : false; }
public bool Add_Nhis_Hist_Sd(string receiver, string sender, string sms_msg) { int affectedRow = 0; int msg_key; string save_time = System.DateTime.Now.ToString("yyyyMMddHHmmss"); IDbConnection conn = DbAgentHelper.CreateDbConnection(); conn.Open(); IDbTransaction trx = conn.BeginTransaction(); try { msg_key = _data.Select_Max_Msg_Key(conn, trx); affectedRow += _data.Insert_Nhis_Hist_Sd(conn, trx, msg_key, receiver, sender, sms_msg, save_time); trx.Commit(); } catch (Exception ex) { trx.Rollback(); affectedRow = 0; } finally { conn.Close(); } return(affectedRow > 0 ? true : false); }
public bool SaveIssueGroup(int estterm_ref_id, int group_code, string group_name, int itxr_user) { bool rtnValue = false; IDbConnection conn = DbAgentHelper.CreateDbConnection(); conn.Open(); IDbTransaction trx = conn.BeginTransaction(); try { rtnValue = base.SaveIssueGroup(conn, trx, estterm_ref_id, group_code, group_name, itxr_user); if (rtnValue) { trx.Commit(); } else { trx.Rollback(); } } catch { trx.Rollback(); } finally { conn.Close(); } return(rtnValue); }
public bool Modify_Common_Soosik_Value(string PRJ_ID, string SOOSIK, string USER_REF_ID) { int affectedRow = 0; IDbConnection conn = DbAgentHelper.CreateDbConnection(); conn.Open(); IDbTransaction trx = conn.BeginTransaction(); try { affectedRow += _data.Update_Pms_Common_Soosik_Value(conn, trx , PRJ_ID, SOOSIK, USER_REF_ID); trx.Commit(); } catch (Exception ex) { trx.Rollback(); } finally { conn.Close(); } return(affectedRow > 0 ? true : false); }
public bool Modify_Prj_Data_Est_Status(int PRJ_REF_ID , int TGT_DEPT_ID , int TGT_EMP_ID , string EST_STATUS , int LOGIN_USER_REF_ID) { IDbConnection conn = DbAgentHelper.CreateDbConnection(); conn.Open(); IDbTransaction trx = conn.BeginTransaction(); int affectedRow = 0; try { affectedRow += _data.Update_Prj_Data_StatusID(conn, trx, PRJ_REF_ID, TGT_DEPT_ID, TGT_EMP_ID, EST_STATUS, LOGIN_USER_REF_ID); trx.Commit(); } catch (Exception ex) { trx.Rollback(); affectedRow = 0; } finally { conn.Close(); } return(affectedRow > 0 ? true : false); }
public bool CalcTermMonth(int estterm_ref_id, string ymd, int txr_user) { bool rtnValue = false; IDbConnection conn = DbAgentHelper.CreateDbConnection(); conn.Open(); IDbTransaction trx = conn.BeginTransaction(); try { rtnValue = base.CalcTermMonth(conn, trx, estterm_ref_id, ymd, txr_user); if (rtnValue) { trx.Commit(); } else { trx.Rollback(); } } catch (Exception ex) { trx.Rollback(); this.Transaction_Message = ex.Message; } finally { conn.Close(); } return(rtnValue); }
//-------------------------------------------------------------------------------------------- // 추가일 : 2007.05.30 // UserControl - LeftMenu, TopMenu의 메뉴 Data를 호출한다 //-------------------------------------------------------------------------------------------- #region public IDataReader GetAuthReadMenu(string asEmpRefID) { IDataReader dr = null; IDbConnection conn = DbAgentHelper.CreateDbConnection(); conn.Open(); IDbTransaction trx = conn.BeginTransaction(); try { Dac_lib_MenuControl dac = new Dac_lib_MenuControl(); dr = dac.GetAuthReadMenu(asEmpRefID); } catch (Exception) { trx.Rollback(); conn.Close(); } finally { conn.Close(); } return(dr); }
public DataSet GetAuthReadSearchMenu(string asEmpRefID, string asSearchStr) { DataSet lDS = new DataSet(); IDbConnection conn = DbAgentHelper.CreateDbConnection(); conn.Open(); IDbTransaction trx = conn.BeginTransaction(); try { Dac_lib_MenuControl dac = new Dac_lib_MenuControl(); lDS = dac.GetAuthReadSearchMenu(asEmpRefID, asSearchStr); } catch (Exception) { trx.Rollback(); conn.Close(); } finally { conn.Close(); } return(lDS); }
/// <summary> /// GetMenuTitle /// : 해당페이지의 메뉴명을 리턴한다. (타이틀 표시시 사용) /// </summary> /// <param name="asPageUrl"></param> /// <returns></returns> public string GetMenuTitle(string asPageUrl) { string sRet = ""; IDbConnection conn = DbAgentHelper.CreateDbConnection(); conn.Open(); IDbTransaction trx = conn.BeginTransaction(); try { Dac_lib_MenuControl dac = new Dac_lib_MenuControl(); sRet = dac.GetMenuTitle(asPageUrl); } catch (Exception) { trx.Rollback(); conn.Close(); } finally { conn.Close(); } return(sRet); }
//public string GetTopMenuHtmlString(string asEmpRefID) //{ // DataSet rDs = base.GetTreeMenuPerUser(asEmpRefID); //} /// <summary> /// GetFinishRate /// : KPI 실적 마감율 추출 /// </summary> /// <param name="asFinishMonth"></param> /// <returns></returns> public int GetFinishRate(int estterm_ref_id, string asFinishMonth) { int iRet = 0; IDbConnection conn = DbAgentHelper.CreateDbConnection(); conn.Open(); IDbTransaction trx = conn.BeginTransaction(); try { Dac_lib_MenuControl dac = new Dac_lib_MenuControl(); iRet = dac.GetFinishRate(estterm_ref_id, asFinishMonth); } catch (Exception) { trx.Rollback(); conn.Close(); } finally { conn.Close(); } return(iRet); }
public bool InsertAppEmp(string biz_type, object[] objDraftEmp, object[, ] objAppEmp, int reg_user) { bool rtnValue = false; this.Transaction_Message = ""; IDbConnection conn = DbAgentHelper.CreateDbConnection(); conn.Open(); IDbTransaction trx = conn.BeginTransaction(); try { rtnValue = base.InsertAppEmp(conn, trx, biz_type, objDraftEmp, objAppEmp, reg_user); trx.Commit(); } catch (Exception ex) { trx.Rollback(); this.Transaction_Message = ex.Message.Replace("\\r", ""); } finally { conn.Close(); conn.Dispose(); } return(rtnValue); }
public bool DeleteIssueGroupMap(int estterm_ref_id, int group_code, DataTable dtInsert) { bool rtnValue = false; IDbConnection conn = DbAgentHelper.CreateDbConnection(); conn.Open(); IDbTransaction trx = conn.BeginTransaction(); try { rtnValue = base.DeleteIssueGroupMap(conn, trx, estterm_ref_id, group_code, dtInsert); if (rtnValue) { trx.Commit(); } else { trx.Rollback(); } } catch { trx.Rollback(); } finally { conn.Close(); } return(rtnValue); }
public bool RemoveQuestionSubject(string q_sbj_id) { int affectedRow = 0; Dac_QuestionItems questionItem = new Dac_QuestionItems(); IDbConnection conn = DbAgentHelper.CreateDbConnection(); conn.Open(); IDbTransaction trx = conn.BeginTransaction(); try { affectedRow += questionItem.Delete(null, null, "", q_sbj_id); affectedRow += _questionsubject.Delete(null, null, q_sbj_id, ""); trx.Commit(); } catch (Exception ex) { trx.Rollback(); return(false); } finally { conn.Close(); } return((affectedRow > 0) ? true : false); }
public bool CopyGroup(int org_estterm_ref_id, int new_estterm_ref_id, int itxr_user) { bool rtnValue = false; IDbConnection conn = DbAgentHelper.CreateDbConnection(); conn.Open(); IDbTransaction trx = conn.BeginTransaction(); try { rtnValue = base.CopyGroup(conn, trx, org_estterm_ref_id, new_estterm_ref_id, itxr_user); if (rtnValue) { trx.Commit(); } else { trx.Rollback(); } } catch { trx.Rollback(); } finally { conn.Close(); } return(rtnValue); }
// iRet : 3 - 중복된 이름 public int InsertThresholdCode(string threshold_ename, string threshold_kname, string image_file_name, int sequence, string use_yn, int emp_ref_id) { int iRet = 0; IDbConnection conn = DbAgentHelper.CreateDbConnection(); conn.Open(); IDbTransaction trx = conn.BeginTransaction(); if (!UseThresholdName(threshold_ename, threshold_kname)) // Threshold 이름 중복여부 확인 { try { GetThresholdCodeAddSeqUpdate(sequence); iRet = InsertThresholdCode_Dac(threshold_ename, threshold_kname, image_file_name, sequence, use_yn, emp_ref_id); trx.Commit(); } catch (Exception) { trx.Rollback(); conn.Close(); } finally { conn.Close(); } } else { iRet = 3; } return(iRet); }
public bool CopyEstDept(int org_estterm_ref_id, int new_estterm_ref_id, int reg_user) { bool rtnValue = false; IDbConnection conn = DbAgentHelper.CreateDbConnection(); conn.Open(); IDbTransaction trx = conn.BeginTransaction(); try { rtnValue = _estDeptInfos.CopyEstDept(conn, trx, org_estterm_ref_id, new_estterm_ref_id, reg_user); if (rtnValue) { trx.Commit(); } else { trx.Rollback(); } } catch (Exception ex) { trx.Rollback(); this.errMSG = ex.Message; } finally { conn.Close(); } return(rtnValue); }
public int InsertThresholdStepNewLevel(int threshold_ref_id, string threshold_level, decimal point, string base_line_yn, int emp_ref_id) { int iRet = 0; IDbConnection conn = DbAgentHelper.CreateDbConnection(); conn.Open(); IDbTransaction trx = conn.BeginTransaction(); try { if (InsertThresholdStepNewLevel_Dac(threshold_ref_id, threshold_level, point, base_line_yn, emp_ref_id)) { iRet = 1; } else { iRet = -1; return(iRet); } trx.Commit(); } catch (Exception) { trx.Rollback(); conn.Close(); } finally { conn.Close(); } return(iRet); }
public bool Modify_Custom_Col_Value(DataTable ColTable, string PRJ_ID, string USER_REF_ID) { int affectedRow = 0; IDbConnection conn = DbAgentHelper.CreateDbConnection(); conn.Open(); IDbTransaction trx = conn.BeginTransaction(); try { for (int i = 0; i < ColTable.Rows.Count; i++) { affectedRow += _data.Update_Pms_Custom_Col_Value(conn, trx, PRJ_ID , ColTable.Rows[i]["PRJ_COL_ID"].ToString() , ColTable.Rows[i]["PRJ_COL_NAME"].ToString() , ColTable.Rows[i]["PRJ_COL_VALUE"].ToString() , USER_REF_ID); } trx.Commit(); } catch (Exception ex) { trx.Rollback(); affectedRow = 0; } finally { conn.Close(); } return(affectedRow > 0 ? true : false); }
public int InsertThresholdStep(string[,] asaCode, string threshold_level, decimal point, string base_line_yn, int emp_ref_id) { int iRet = 0; IDbConnection conn = DbAgentHelper.CreateDbConnection(); conn.Open(); IDbTransaction trx = conn.BeginTransaction(); try { for (int i = 0; i <= asaCode.GetUpperBound(0); i++) { iRet += InsertThresholdStep_Dac(asaCode[i, 0], threshold_level, base_line_yn, point, emp_ref_id); } trx.Commit(); } catch (Exception) { trx.Rollback(); conn.Close(); } finally { conn.Close(); } return(iRet); }
public bool Remove_Mul_Basic_Info(int comp_id , string est_id , int estterm_ref_id , int estterm_sub_id) { int affectedRow = 0; IDbConnection conn = DbAgentHelper.CreateDbConnection(); conn.Open(); IDbTransaction trx = conn.BeginTransaction(); try { affectedRow += _data.Delete_Mul_Est_Basic_Info(conn, trx , comp_id , est_id , estterm_ref_id , estterm_sub_id); trx.Commit(); } catch (Exception ex) { trx.Rollback(); affectedRow = 0; } finally { conn.Close(); } return(affectedRow > 0 ? true : false); }
public int DelThresholdStep(string[,] asaCode, string threshold_level) { int iRet = 0; IDbConnection conn = DbAgentHelper.CreateDbConnection(); conn.Open(); IDbTransaction trx = conn.BeginTransaction(); try { for (int i = 0; i <= asaCode.GetUpperBound(0); i++) { int oldseq = RtnThresholdSetpOldSeq_Dac(threshold_level, Convert.ToInt32(asaCode[i, 0])); iRet += DelThresholdStep_Dac(Convert.ToInt32(asaCode[i, 0]), threshold_level); GetThresholdStepDelSeqUpdate(threshold_level, oldseq); } trx.Commit(); } catch (Exception) { trx.Rollback(); conn.Close(); } finally { conn.Close(); } return(iRet); }
public bool RemoveEstBiasGroup_DB(int bias_grp_id) { int affectedRow = 0; IDbConnection conn = DbAgentHelper.CreateDbConnection(); conn.Open(); IDbTransaction trx = conn.BeginTransaction(); try { affectedRow += _data.Delete_DB(conn , trx , bias_grp_id); trx.Commit(); } catch (Exception ex) { trx.Rollback(); affectedRow = 0; } finally { conn.Close(); } return(affectedRow > 0 ? true : false); }
public string Insert_DB(int FAQ_CATEGORY , string FAQ_QUESTION , string FAQ_ANSWER , int CREATE_USER) { string rtnValue = string.Empty; int okCnt = 0; IDbConnection conn = DbAgentHelper.CreateDbConnection(); conn.Open(); IDbTransaction trx = conn.BeginTransaction(); try { MicroBSC.Integration.BSC.Dac.Dac_Bsc_Faq dacBscFaq = new MicroBSC.Integration.BSC.Dac.Dac_Bsc_Faq(); okCnt = dacBscFaq.InsertData_DB(conn, trx, FAQ_CATEGORY, FAQ_QUESTION, FAQ_ANSWER, CREATE_USER); trx.Commit(); } catch (Exception ex) { rtnValue = ex.Message; trx.Rollback(); } finally { conn.Close(); } return(rtnValue); }
public bool RemoveRelGroupPosData(DataTable dataTable) { int affectedRow = 0; IDbConnection conn = DbAgentHelper.CreateDbConnection(); conn.Open(); IDbTransaction trx = conn.BeginTransaction(); try { foreach (DataRow dataRow in dataTable.Rows) { affectedRow += _relGroupPosData.Delete(conn , trx , DataTypeUtility.GetToInt32(dataRow["COMP_ID"]) , dataRow["REL_GRP_POS_DATA_ID"].ToString() , ""); } trx.Commit(); } catch (Exception ex) { trx.Rollback(); return(false); } finally { conn.Close(); } return((affectedRow > 0) ? true : false); }
public string Delete_DB(int IDX, int UPDATE_USER) { string rtnValue = string.Empty; int okCnt = 0; IDbConnection conn = DbAgentHelper.CreateDbConnection(); conn.Open(); IDbTransaction trx = conn.BeginTransaction(); try { MicroBSC.Integration.BSC.Dac.Dac_Bsc_Faq dacBscFaq = new MicroBSC.Integration.BSC.Dac.Dac_Bsc_Faq(); okCnt = dacBscFaq.Delete_DB(conn, trx, IDX, UPDATE_USER); trx.Commit(); } catch (Exception ex) { rtnValue = ex.Message; trx.Rollback(); } finally { conn.Close(); } return(rtnValue); }
public bool RemoveQuestionObject(string q_obj_id) { int affectedRow = 0; Dac_QuestionEstMaps questionEstMap = new Dac_QuestionEstMaps(); Dac_QuestionSubjects questionSubject = new Dac_QuestionSubjects(); Dac_QuestionItems questionItem = new Dac_QuestionItems(); Dac_QuestionDatas questionData = new Dac_QuestionDatas(); IDbConnection conn = DbAgentHelper.CreateDbConnection(); conn.Open(); IDbTransaction trx = conn.BeginTransaction(); try { affectedRow += questionItem.DeleteByQObjID(conn, trx, q_obj_id); affectedRow += questionSubject.Delete(conn, trx, "", q_obj_id); affectedRow += questionEstMap.Delete(conn, trx, "", q_obj_id); affectedRow += _questionObject.Delete(conn, trx, q_obj_id); trx.Commit(); } catch (Exception ex) { trx.Rollback(); return(false); } finally { conn.Close(); } return((affectedRow > 0) ? true : false); }
public bool Add_Project_Info_To_Pms(DateTime start_date, DateTime end_date, string projectid_list, string colList) { string sDate = start_date.ToString("yyyy-MM-dd"); string eDate = end_date.ToString("yyyy-MM-dd"); IDbConnection conn = DbAgentHelper.CreateDbConnection(); conn.Open(); IDbTransaction trx = conn.BeginTransaction(); int affectedRow = 0; try { affectedRow = _data.Delete_Pms_info(conn, trx, projectid_list); affectedRow = _data.Insert_From_Vw_Bsc_Pms(conn, trx, sDate, eDate, projectid_list, colList); trx.Commit(); } catch (Exception ex) { trx.Rollback(); affectedRow = 0; } finally { conn.Close(); } return(affectedRow > 0 ? true : false); }