private void AddNewDocument(object sender, EventArgs e) { string link_code = gd_List.GetSelectString("LINK_CD"); OpenFileDialog frm = new OpenFileDialog(); if (frm.ShowDialog() == DialogResult.OK) { new FileSender(link_code, frm.FileName); ClearSearchData(); SetSearchData("LINK_CODE", link_code); SetSearchData("GRP_NO", gd_schedule.SelectedCells.Count > 0 ? gd_schedule.Rows[gd_schedule.SelectedCells[0].RowIndex].Cells["SCH_DESC"].Value : "사업 접수"); SetSearchData("CRT_USER_ID", DTOFactory.UserId); SetServiceId("InsertBusinessDocument"); try { DTOFactory.Transaction(new ReportDTO()); ViewMessage.Info("문서 등록이 완료 되었습니다."); gd_Document.DataSource = DTOFactory.GetDataTable(); } catch (Exception ex) { ViewMessage.Error(ex.Message); } } }
private void Search(object sender, EventArgs e) { ClearSearchData(); SetSearchData("FROM_DT", dtFrom.Value.ToString("yyyy-MM-dd")); SetSearchData("TO_DT", dtTo.Value.ToString("yyyy-MM-dd")); SetServiceId("GetAccountHistory"); try { DTOFactory.Transaction(new AccountDTO()); DataSet ds_return = DTOFactory.GetDataSet(); _dtCard = ds_return.Tables["ds_card"]; _dtBank = ds_return.Tables["ds_bank"]; if (bool1) { gd_Card.DataSource = _dtCard; gd_Bank.DataSource = _dtBank; gd_Card.SetGridColumn(ds_return.Tables["ds_column1"]); gd_Bank.SetGridColumn(ds_return.Tables["ds_column2"]); bool1 = false; } } catch (Exception ex) { ViewMessage.Error(ex.Message); } }
private void Search(object sender, EventArgs e) { if (!"".Equals(cboOrder.ValueList)) { ClearSearchData(); SetSearchData("DOC_ID", cboOrder.ValueList); SetServiceId("GetOrder"); try { DTOFactory.Transaction(new ProductDTO()); DS = DTOFactory.GetDataSet(); txtDocId.Text = DS.Tables["ds_master"].Rows[0]["DOC_ID"].ToString(); txtCrtDt.Text = DS.Tables["ds_master"].Rows[0]["CRT_DT"].ToString(); txtVendorNm.Text = DS.Tables["ds_master"].Rows[0]["VENDOR_NM"].ToString(); txtOrderDt.Text = DS.Tables["ds_master"].Rows[0]["ORDER_DT"].ToString(); txtVendorTel.Text = DS.Tables["ds_master"].Rows[0]["VENDOR_TEL"].ToString(); gd_List.DataSource = DS.Tables["ds_list"]; gd_List.SetGridColumn(DS.Tables["ds_column"]); for (int i = 0; i < gd_List.RowCount; i++) { gd_List.Rows[i].Cells["NO"].Value = i + 1; } } catch (Exception e1) { ViewMessage.Error(e1.Message); } } }
private void Search(object sender, EventArgs e) { ClearSearchData(); SetSearchData("FROM_DT", dtFrom.Value.ToString("yyyy-MM-dd")); SetSearchData("TO_DT", dtTo.Value.ToString("yyyy-MM-dd")); SetSearchData("COMP_CD", cboComp.ValueList); SetSearchData("MODEL_ID", cbockModel.ValueList); SetSearchData("STAT_CD", cboStatus.ValueList); SetServiceId("GetDeliverList"); try { DTOFactory.Transaction(new MachineDTO()); DataSet ds = DTOFactory.GetDataSet(); _dtList = ds.Tables["ds_list"]; gd_List.DataSource = _dtList; if (!gd_List.LabelDisplayed) { gd_List.SetGridColumn(ds.Tables["ds_column"]); } if (gd_List.Rows.Count > 0) { gd_List.Rows[0].Selected = true; ViewDetail(gd_List, new DataGridViewCellEventArgs(0, 0)); } } catch (Exception ex) { ViewMessage.Error(ex.Message); } }
private void GridAction(object sender, DataGridViewCellEventArgs e) { DataGridView view = (DataGridView)sender; if (e.RowIndex > -1) { if ("SAVE".Equals(view.Columns[e.ColumnIndex].Name)) { DataGridViewRow row = view.Rows[view.SelectedCells[0].RowIndex]; ClearSearchData(); SetSearchData("MGR_CD", row.Cells["MGR_CD"].Value); SetSearchData("PROC_COMP_CD", row.Cells["PROC_COMP_CD"].Value); SetSearchData("PROC_EQP_ID", row.Cells["PROC_EQP_ID"].Value); SetSearchData("PROD_COMP_CD", row.Cells["PROD_COMP_CD"].Value); SetSearchData("PROD_MODEL_ID", row.Cells["PROD_MODEL_ID"]); SetSearchData("CRT_USER_ID", DTOFactory.UserId); SetServiceId("SetEqpInfo"); try { DTOFactory.Transaction(new ManagerDTO()); } catch (Exception ex) { ViewMessage.Error(ex.Message); } } else if ("DEL".Equals(view.Columns[e.ColumnIndex].Name)) { } } }
private void btnSave_Click(object sender, EventArgs e) { ClearSearchData(); SetSearchData("DOC_TYP_CD", DOC_TYP_CD); SetSearchData("CRT_USER_ID", DTOFactory.UserId); if ("15".Equals(DOC_TYP_CD) || "16".Equals(DOC_TYP_CD)) { SetSearchData("START_TM", dtFrom.Value.ToString("yyyy-MM-dd") + " " + dtFromTime.Value.ToString("HH")); SetSearchData("END_TM", dtTo.Value.ToString("yyyy-MM-dd") + " " + dtToTime.Value.ToString("HH")); } else { SetSearchData("START_TM", dtFrom.Value.ToString("yyyy-MM-dd")); SetSearchData("END_TM", dtTo.Value.ToString("yyyy-MM-dd")); } SetSearchData("DOC_DESC", txtDocDesc.Text); SetServiceId("SetDocList"); try { DTOFactory.Transaction(new DocDTO()); DialogResult = DialogResult.OK; ViewMessage.Info("문서 등록이 완료 되었습니다."); Close(); } catch (Exception ex) { ViewMessage.Error(ex.Message); } }
private void Save(object sender, EventArgs e) { if ("".Equals(ACC_CD)) { FileSender file = new FileSender("", txtBankImage.Text); Link = file.GetLinkCode(); file.Close(); } ClearSearchData(); SetSearchData("ACC_CD", ACC_CD); SetSearchData("ACC_TYPE", cboType.ValueList); SetSearchData("OUT_BANK_NM", cboBank.ValueList); SetSearchData("OUT_BANK_NO", txtBankCode.Text); SetSearchData("USER_ID", cboUser.ValueList); SetSearchData("ACCOUNT_DESC", txtBankDesc.Text); SetSearchData("LINK_CODE", Link); SetSearchData("UPT_USER_ID", DTOFactory.UserId); SetServiceId("SetBankAccountList"); try { DTOFactory.Transaction(new AccountDTO()); DialogResult = DialogResult.OK; ViewMessage.Info("등록이 완료 되었습니다."); Close(); } catch (Exception ex) { ViewMessage.Error(ex.Message); } }
private void GetModelInfo(int index) { DataRow row = _dtModel.Rows[index]; ClearSearchData(); SetSearchData("PLAN_CD", row["PLAN_CD"]); SetSearchData("ESTIMATE_CD", row["ESTIMATE_CD"]); SetSearchData("LINK_CODE", row["LINK_CD"]); SetServiceId("GetModelInfo"); try { DTOFactory.Transaction(new MachineDTO()); DataSet ds = DTOFactory.GetDataSet(); _dtPlan = ds.Tables["ds_plan"]; _dtEstimate = ds.Tables["ds_estimate"]; _dtDocument = ds.Tables["ds_document"]; LstPlan.DataSource = _dtPlan; LstEstimate.DataSource = _dtEstimate; LstDocument.DataSource = _dtDocument; LstPlan.DisplayMember = "FILE_DESC"; LstEstimate.DisplayMember = "FILE_DESC"; LstDocument.DisplayMember = "FILE_DESC"; } catch (Exception ex) { ViewMessage.Error(ex.Message); } }
private void RemoveCompRow(object sender, EventArgs e) { if (gd_List.SelectedRows.Count == 1) { if (!"".Equals(_dtComp.Rows[gd_List.SelectedRows[0].Index]["COMP_CD"].ToString())) { if (System.Windows.Forms.MessageBox.Show( _dtComp.Rows[gd_List.SelectedRows[0].Index]["COMP_NM"].ToString() + " 사업장을 삭제 하시겠습니까?", "업체 제거" , MessageBoxButtons.YesNo) == DialogResult.Yes) { ClearSearchData(); SetSearchData("COMP_CODE", _dtComp.Rows[gd_List.SelectedRows[0].Index]["COMP_CD"].ToString()); SetServiceId("RemoveComp"); try { DTOFactory.Transaction(new MemberDTO()); _dtComp.Rows.RemoveAt(gd_List.SelectedRows[0].Index); } catch (Exception ex) { ViewMessage.Error(ex.Message); } } } } }
private void ImageAdd(object sender, EventArgs e) { int row = gd_VerList.SelectedRows[0].Index; OpenFileDialog frm = new OpenFileDialog(); if (frm.ShowDialog() == DialogResult.OK) { new FileSender(_dtVersion.Rows[row]["LINK_CD"].ToString(), frm.FileName); _dtSearch.Clear(); DataRow dr = _dtSearch.NewRow(); dr["FIELD"] = "LINK_CODE"; dr["DATA"] = gd_VerList.Rows[row].Cells["LINK_CD"].Value.ToString(); _dtSearch.Rows.Add(dr); SetServiceId("GetLinkList"); try { DTOFactory.Transaction(new ProjectDTO()); _dtLink = DTOFactory.GetDataTable(); ViewImage(ImageIndex + 1); btnFirst.Enabled = true; btnLast.Enabled = true; btnImgAdd.Enabled = true; } catch (Exception ex) { ViewMessage.Error(ex.Message); } } }
private void SetCompInfo(object sender, DataGridViewCellEventArgs e) { DataGridView view = (DataGridView)sender; if (e.RowIndex > -1) { if ("DEL".Equals(view.Columns[e.ColumnIndex].Name)) { if (!"".Equals(_dtComp.Rows[e.RowIndex]["COMP_CD"].ToString())) { if (System.Windows.Forms.MessageBox.Show( _dtComp.Rows[e.RowIndex]["COMP_NM"].ToString() + " 업체 정보를 삭제 하시겠습니까?", "기관 제거" , MessageBoxButtons.YesNo) == DialogResult.Yes) { ClearSearchData(); SetSearchData("COMP_CODE", _dtComp.Rows[e.RowIndex]["COMP_CD"].ToString()); SetServiceId("RemoveComp"); try { DTOFactory.Transaction(new MemberDTO()); _dtComp.Rows.RemoveAt(e.RowIndex); ViewMessage.Info("기관 정보가 삭제 되었습니다."); } catch (Exception ex) { ViewMessage.Error(ex.Message); } } } } } }
private void Search(object sender, EventArgs e) { ClearSearchData(); SetSearchData("FROM_DT", dtFrom.Value.ToString("yyyy/MM/dd")); SetSearchData("TO_DT", dtTo.Value.ToString("yyyy/MM/dd")); SetSearchData("CST_COMP_CD", cboSearchComp.ValueList); SetServiceId("GetEstimateList"); cboCstUser.SetItemChecked(""); cboProject.SetItemChecked(""); cboCashType1.SetItemChecked(""); cboCashType2.SetItemChecked(""); cboWarrType.SetItemChecked(""); txtDocId.Text = ""; txtSubject.Text = ""; txtCost.Text = ""; txtVat.Text = ""; calWorkDt.Value = DateTime.Now; DTOFactory.Action(); try { DTOFactory.Transaction(new ReportDTO()); DataSet ds_return = DTOFactory.GetDataSet(); dt_Group = ds_return.Tables["ds_group"]; gd_Group.DataSource = dt_Group; gd_Group.SetGridColumn(ds_return.Tables["ds_column"]); cboCstUser.Params.Clear(); cboCstUser.Params.Add("strCompCode", cboSearchComp.ValueList); cboCstUser.BindDataSet(); cboItmModel.Params.Clear(); cboItmModel.Params.Add("strCompCode", cboSearchComp.ValueList); cboItmModel.BindDataSet(); //검색 기록이 없을때 rows가 추가되는걸 방지 if (gd_Group.Rows.Count == 0) { gd_Group.Columns["Rows"].Visible = false; } panel5.Enabled = true; panel7.Enabled = true; if (dt_Group.Rows.Count != 0) { ViewGroup(gd_Group, new DataGridViewCellEventArgs(0, 0)); } } catch (Exception ex) { ViewMessage.Error(ex.Message); } DTOFactory.Complete(); }
private void CompCheck(object sender, EventArgs e) { ClearSearchData(); SetSearchData("COMP_NAME", txtCompName); SetSearchData("COMP_TYPE", "G"); SetServiceId("GetCompInfo"); try { DTOFactory.Transaction(new MemberDTO()); DataTable dt = DTOFactory.GetDataTable("ds_comp"); if (dt.Rows.Count > 0) { ViewMessage.Info("이미 등록된 기관명 입니다."); } else { ViewMessage.Info("등록이 가능한 기관명 입니다."); btnInsert.Enabled = true; } } catch (Exception ex) { ViewMessage.Error(ex.Message); } }
private void GetUserProgram(int row) { ClearSearchData(); SetSearchData("USER_ID", dtUser.Rows[row]["USER_ID"]); SetServiceId("GetProgramList"); try { DTOFactory.Transaction(new AdminDTO()); DataSet ds = DTOFactory.GetDataSet();; dtUserProgram = ds.Tables["ds_userprogram"]; dtProgram = ds.Tables["ds_program"]; gd_UserProgram.DataSource = dtUserProgram; gd_Program.DataSource = dtProgram; gd_UserProgram.SetGridColumn(ds.Tables["ds_column"]); gd_Program.SetGridColumn(ds.Tables["ds_column"]); } catch (Exception ex) { ViewMessage.Error(ex.Message); } }
private void GetCheckResult(object sender, EventArgs e) { ClearSearchData(); SetSearchData("SUBJECT", txtSubject.Text); SetServiceId("GetBusiness"); DTOFactory.SetDTO(_dtSearch); DTOFactory.Transaction(new ReportDTO()); try { DataTable dt = DTOFactory.GetDataTable(); string LINK_CODE = dt.Rows[0]["LINK_CODE"].ToString(); SetSearchData("LINK_CODE", LINK_CODE); foreach (DataRow row in _dtFile.Rows) { new FileSender(LINK_CODE, row["DIR"].ToString()); } } catch (Exception ex) { ViewMessage.Error(ex.Message); } SetServiceId("InsertBusinessDocument"); DTOFactory.Transaction(new ReportDTO()); ViewMessage.Info("사업 등록을 완료 하였습니다."); }
private void GetBankInfo() { ClearSearchData(); SetSearchData("ACC_CD", ACC_CD); SetServiceId("GetBankAccountList"); try { DTOFactory.Transaction(new AccountDTO()); DataTable dt = DTOFactory.GetDataTable(); cboType.SetItemChecked(dt.Rows[0]["ACC_TYP_CD"].ToString()); cboBank.SetItemChecked(dt.Rows[0]["BNK_COMP_CD"].ToString()); cboUser.SetItemChecked(dt.Rows[0]["USER_ID"].ToString()); txtBankCode.Text = dt.Rows[0]["BNK_NO"].ToString(); txtBankDesc.Text = dt.Rows[0]["ACC_DESC"].ToString(); Link = dt.Rows[0]["LINK_CD"].ToString(); txtBankImage.Text = ""; cboType.Enabled = false; cboBank.Enabled = false; txtBankCode.Enabled = false; btnFile.Enabled = false; } catch (Exception ex) { ViewMessage.Error(ex.Message); } }
private void Save(object sender, EventArgs e) { string MENU_ID = ""; foreach (DataRow row in dtUserProgram.Rows) { MENU_ID += "," + row["MENU_ID"].ToString(); } int Row = gd_User.SelectedCells[0].RowIndex; ClearSearchData(); SetSearchData("MENU_ID", MENU_ID.Length > 0 ? MENU_ID.Substring(1) : MENU_ID); SetSearchData("USER_ID", gd_User.SelectedRows[0].Cells["USER_ID"].Value.ToString()); SetServiceId("SetPgmList"); try { DTOFactory.Transaction(new AdminDTO()); DataSet ds = DTOFactory.GetDataSet();; ViewMessage.Info("메뉴 저장이 완료 되었습니다."); GetUserProgram(gd_User.SelectedRows[0].Index); } catch (Exception ex) { ViewMessage.Error(ex.Message); } }
private void InitControl() { SetServiceId("GetItemList"); try { DTOFactory.Transaction(new AdminDTO()); DataSet ds = DTOFactory.GetDataSet(); menuView.Nodes.Clear(); dtMenu = ds.Tables["ds_menu"]; if (dtMenu.PrimaryKey.Length == 0) { DataColumn[] col = new DataColumn[1]; col[0] = dtMenu.Columns["MENU_ID"]; dtMenu.PrimaryKey = col; } GetMenuItem(dtMenu); dtProgram = ds.Tables["ds_pgm"]; gd_ProgramList.DataSource = dtProgram; } catch (Exception ex) { ViewMessage.Error(ex.Message); } }
private void ItemClick(object sender, DataGridViewCellEventArgs e) { DataGridView view = (DataGridView)sender; if ("관리".Equals(view.Columns[e.ColumnIndex].HeaderText)) { ClearSearchData(); SetSearchData("ITEM_ID", gd_List.SelectedCells[0].Value); SetSearchData("SEQ_NO", _dtItem.Rows[e.RowIndex]["SEQ_NO"].ToString()); SetSearchData("ITEM_CD", _dtItem.Rows[e.RowIndex]["ITEM_CD"]); SetSearchData("ITEM_NM", _dtItem.Rows[e.RowIndex]["ITEM_NM"]); SetServiceId("SetItemList"); try { DTOFactory.Transaction(new AdminDTO()); ViewMessage.Info("저장이 완료 되었습니다."); } catch (Exception ex) { ViewMessage.Error(ex.Message); } } }
private void BtnSearch_Click(object sender, EventArgs e) { ClearSearchData(); SetSearchData("DOC_ID", cboOrder.ValueList); SetSearchData("STAT_CD", "2,3"); SetServiceId("GetProductSimpleList"); try { DTOFactory.Transaction(new MachineDTO()); DataSet ds_return = DTOFactory.GetDataSet(); dt_Eqp = ds_return.Tables["ds_eqp"]; Gd_Eqp.DataSource = dt_Eqp; Gd_Eqp.SetGridColumn(ds_return.Tables["ds_eqp_column"]); Gd_Eqp.MultiSelect = true; cboUser.Params.Clear(); cboUser.Params.Add("strCompType", "V"); cboUser.Params.Add("strCompCode", dt_Eqp.Rows[0]["COMP_CD"].ToString()); cboUser.BindDataSet(); } catch (Exception ex) { ViewMessage.Error(ex.Message); } }
public void Confirm(object sender, EventArgs e) { if (rdbConfirm.Checked || rdbReturn.Checked) { if (rdbConfirm.Checked) { CFM = true; } string cfm_YN; string cfm_YN2; if (CFM == true) { cfm_YN = "승인"; cfm_YN2 = "Y"; } else { cfm_YN = "반려"; cfm_YN2 = "N"; } ClearSearchData(); SetSearchData("STAT_CD", cfm_YN2); SetSearchData("DOC_DESC", txtCfm_DESC.Text); SetSearchData("DOC_ID", DOC_ID); SetSearchData("DOC_TYP_CD", DOC_TYP_CD); SetSearchData("USER_ID", "100000"); SetServiceId("SetConfirmItem"); try { DTOFactory.Transaction(new DocDTO()); Mail.Subject = "[문서 검토] " + txtDocType.Text + "(" + DOC_ID + ") - " + txtCrtUser.Text; Mail.To = EMAIL; Mail.IsDirect = true; string strBody = "하기의 사유로 문서가 " + cfm_YN + "되었습니다.<br><hr>"; strBody += txtCfm_DESC.Text.Replace("\r\n", "<br>"); Mail.Send(strBody); DialogResult = DialogResult.OK; ViewMessage.Info("해당 문서가 검토되었습니다."); } catch (Exception ex) { ViewMessage.Error(ex.Message); } } else { ViewMessage.Warning("승인 여부를 선택해주십시오."); } }
private void GetUserInfo(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex > -1 && e.ColumnIndex > -1 && "DataGridViewTextBoxCell".Equals(gd_List.Columns[e.ColumnIndex].CellType.Name)) { ClearSearchData(); SetSearchData("COMP_CODE", _dtComp.Rows[e.RowIndex]["COMP_CD"].ToString()); SetServiceId("GetUserList"); try { DTOFactory.Transaction(new MemberDTO()); DataSet ds = DTOFactory.GetDataSet(); _dtUser = ds.Tables["ds_user"]; gd_Member.DataSource = _dtUser; if (!gd_Member.LabelDisplayed) { gd_Member.SetGridColumn(ds.Tables["ds_user_column"]); gd_Member.SelectionMode = DataGridViewSelectionMode.CellSelect; gd_Member.ReadOnly = false; gd_Member.Columns["ADDR_CD"].Visible = false; gd_Member.Columns["ADDR"].Visible = false; gd_Member.Columns["JOIN_DT"].Visible = false; gd_Member.Columns["RETIRE_DT"].Visible = false; gd_Member.Columns["TEL_2"].Visible = false; gd_Member.Columns["STAT_CD"].Visible = false; gd_Member.Columns["LINE_ID"].HeaderText = "담당업무"; gd_Member.Columns["TEL_1"].HeaderText = "연락처"; DataGridViewButtonColumn bt = new DataGridViewButtonColumn() { Text = "저장", HeaderText = "관리", Name = "SAVE", UseColumnTextForButtonValue = true }; gd_Member.Columns.AddRange(bt); DataGridViewButtonColumn bt2 = new DataGridViewButtonColumn() { Text = "삭제", HeaderText = "관리", Name = "DEL", UseColumnTextForButtonValue = true }; gd_Member.Columns.AddRange(bt2); } btnMemberAdd.Enabled = true; } catch (Exception ex) { ViewMessage.Error(ex.Message); } } }
private void NodeMenu(object sender, MouseEventArgs e) { TreeView view = (TreeView)sender; view.SelectedNode = view.GetNodeAt(e.X, e.Y); if (view.SelectedNode != null) { #region 오른쪽 버튼을 통한 Context Menu View if (e.Button == MouseButtons.Right) { DataRow row = dtMenu.Rows.Find(view.SelectedNode.Name); ContextMenu menu = new ContextMenu(); MenuItem item = new MenuItem("Add", AddNode); menu.MenuItems.Add(item); if (row != null) { int seq_no = (int)row["SEQ_NO"]; int max_no = int.Parse(dtMenu.Compute("MAX(SEQ_NO)", "MENU_PARENT='" + row["MENU_PARENT"] + "'").ToString()); if (seq_no > 0) { item = new MenuItem("Up", MoveNodeUp); menu.MenuItems.Add(item); } if (seq_no < max_no) { item = new MenuItem("Down", MoveNodeDown); menu.MenuItems.Add(item); } } menu.Show(view, e.Location); } #endregion else { ClearSearchData(); SetSearchData("MENU_PARENT", view.SelectedNode.Name); SetServiceId("GetMenuProgramList"); try { DTOFactory.Transaction(new AdminDTO()); dtMenuProgram = DTOFactory.GetDataTable(); gd_Program.DataSource = dtMenuProgram; } catch (Exception ex) { ViewMessage.Error(ex.Message); } } } }
private void MenuSave(object sender, EventArgs e) { DataRow[] dr = dtMenu.Select("USE_YN <> 'Y'"); if (dr.Length > 0) { string MENU_ID = ""; string MENU_NM = ""; string MENU_LEVEL = ""; string SEQ_NO = ""; string MENU_PARENT = ""; foreach (DataRow row in dr) { MENU_ID += "," + row["MENU_ID"].ToString(); MENU_NM += "," + row["MENU_NM"].ToString(); MENU_LEVEL += "," + row["MENU_LEVEL"].ToString(); SEQ_NO += "," + row["SEQ_NO"].ToString(); MENU_PARENT += "," + row["MENU_PARENT"].ToString(); } ClearSearchData(); SetSearchData("MENU_ID", MENU_ID.Length > 0 ? MENU_ID.Substring(1) : MENU_ID); SetSearchData("MENU_NM", MENU_NM.Length > 0 ? MENU_NM.Substring(1) : MENU_NM); SetSearchData("MENU_LEVEL", MENU_LEVEL.Length > 0 ? MENU_LEVEL.Substring(1) : MENU_LEVEL); SetSearchData("SEQ_NO", SEQ_NO.Length > 0 ? SEQ_NO.Substring(1) : SEQ_NO); SetSearchData("MENU_PARENT", MENU_PARENT.Length > 0 ? MENU_PARENT.Substring(1) : MENU_PARENT); SetServiceId("SetMenuList"); try { DTOFactory.Transaction(new AdminDTO()); DataSet ds = DTOFactory.GetDataSet(); ViewMessage.Info("메뉴 저장이 완료 되었습니다."); menuView.Nodes.Clear(); dtMenu = ds.Tables["ds_menu"]; if (dtMenu.PrimaryKey.Length == 0) { DataColumn[] col = new DataColumn[1]; col[0] = dtMenu.Columns["MENU_ID"]; dtMenu.PrimaryKey = col; } GetMenuItem(dtMenu); dtProgram = ds.Tables["ds_pgm"]; gd_ProgramList.DataSource = dtProgram; } catch (Exception ex) { ViewMessage.Error(ex.Message); } } }
private void ViewVersion(int index) { btnVerDel.Enabled = true; btnVerSave.Enabled = true; txtVer.Text = gd_VerList.Rows[index].Cells["VER_NM"].Value.ToString(); txtVerSubject.Text = gd_VerList.Rows[index].Cells["SUBJECT"].Value.ToString(); txtVerDesc.Text = gd_VerList.Rows[index].Cells["CMT_DESC"].Value.ToString(); if (!"".Equals(gd_VerList.Rows[index].Cells["LINK_CD"].Value.ToString())) { ImageIndex = -1; _dtSearch.Clear(); DataRow dr = _dtSearch.NewRow(); dr["FIELD"] = "LINK_CODE"; dr["DATA"] = gd_VerList.Rows[index].Cells["LINK_CD"].Value.ToString(); _dtSearch.Rows.Add(dr); SetServiceId("GetLinkList"); try { DTOFactory.Transaction(new ProjectDTO()); _dtLink = DTOFactory.GetDataTable(); if (_dtLink.Rows.Count > 0) { ViewImage(0); } else { PicVer.Image = null; } btnFirst.Enabled = true; btnLast.Enabled = true; btnImgAdd.Enabled = true; } catch (Exception ex) { ViewMessage.Error(ex.Message); } } else { PicVer.Image = null; btnFirst.Enabled = false; btnLeft.Enabled = false; btnRight.Enabled = false; btnLast.Enabled = false; btnImgAdd.Enabled = false; btnImgDel.Enabled = false; } }
private void ProgramSave(object sender, EventArgs e) { if (dtMenuProgram.Rows.Count > 0) { string MENU_ID = ""; string MENU_NM = ""; string SEQ_NO = ""; string USE_YN = ""; foreach (DataRow row in dtMenuProgram.Rows) { MENU_ID += "," + row["MENU_ID"].ToString(); MENU_NM += "," + row["MENU_NM"].ToString(); SEQ_NO += "," + row["SEQ_NO"].ToString(); USE_YN += "," + row["USE_YN"].ToString(); } string parent = menuView.SelectedNode.Name; DataRow menu = dtMenu.Rows.Find(parent); ClearSearchData(); SetSearchData("MENU_ID", MENU_ID.Length > 0 ? MENU_ID.Substring(1) : MENU_ID); SetSearchData("MENU_NM", MENU_NM.Length > 0 ? MENU_NM.Substring(1) : MENU_NM); SetSearchData("MENU_LEVEL", int.Parse(menu["MENU_LEVEL"].ToString()) + 1); SetSearchData("SEQ_NO", SEQ_NO.Length > 0 ? SEQ_NO.Substring(1) : SEQ_NO); SetSearchData("MENU_PARENT", parent); SetSearchData("USE_YN", USE_YN.Length > 0 ? USE_YN.Substring(1) : USE_YN); SetServiceId("SetPgmList"); try { DTOFactory.Transaction(new AdminDTO()); DataSet ds = DTOFactory.GetDataSet(); ViewMessage.Info("메뉴 저장이 완료 되었습니다."); menuView.Nodes.Clear(); dtMenu = ds.Tables["ds_menu"]; if (dtMenu.PrimaryKey.Length == 0) { DataColumn[] col = new DataColumn[1]; col[0] = dtMenu.Columns["MENU_ID"]; dtMenu.PrimaryKey = col; } GetMenuItem(dtMenu); dtProgram = ds.Tables["ds_pgm"]; gd_ProgramList.DataSource = dtProgram; } catch (Exception ex) { ViewMessage.Error(ex.Message); } } }
private void ScheduleUpdate(object sender, ToolStripItemClickedEventArgs e) { switch (e.ClickedItem.Text) { case "일정 수정": string desc = Microsoft.VisualBasic.Interaction.InputBox("변경할 일정 내용을 입력 하시오.", "일정 수정", gd_list.SelectedRows[0].Cells["SCH_DESC"].Value.ToString()); if (!"".Equals(desc)) { ClearSearchData(); SetSearchData("USER_ID", DTOFactory.UserId); SetSearchData("SCH_TM", gd_list.SelectedRows[0].Cells["SCH_TM"].Value); SetSearchData("WORK_CD", gd_list.SelectedRows[0].Cells["DEL_YN"].Value); SetSearchData("DESC", desc); SetServiceId("UpdateSchedule"); try { DTOFactory.Transaction(new MemberDTO()); ViewMessage.Info("일정 내용을 수정 하였습니다."); SetCalendar(); } catch (Exception ex) { ViewMessage.Error(ex.Message); } } break; case "일정 취소": if (System.Windows.Forms.MessageBox.Show( "해당 일정을 취소 하시겠습니까?\r\n(타인의 일정은 취소 할 수 없습니다.)", "일정 취소" , MessageBoxButtons.YesNo) == DialogResult.Yes) { ClearSearchData(); SetSearchData("USER_ID", DTOFactory.UserId); SetSearchData("SCH_TM", gd_list.SelectedRows[0].Cells["SCH_TM"].Value); SetServiceId("DisableSchedule"); try { DTOFactory.Transaction(new MemberDTO()); ViewMessage.Info("일정을 취소 하였습니다."); SetCalendar(); } catch (Exception ex) { ViewMessage.Error(ex.Message); } } break; } }
private void Save(object sender, EventArgs e) { if (!"".Equals(txtReceipt.Text)) { FileSender file = new FileSender("", txtReceipt.Text); string Link = file.GetLinkCode(); file.Close(); ClearSearchData(); SetSearchData("ACC_DT", calAccDate.Value.ToString("yyyy-MM-dd")); SetSearchData("CASH", txtAccCash.Text.Replace(",", "")); SetSearchData("CASH_DESC", txtAccDesc.Text); SetSearchData("ACCOUNT_DESC", txtAccInfo.Text); SetSearchData("LINK_CODE", Link); SetSearchData("UPT_USER_ID", DTOFactory.UserId); if (rdoBank.Checked) { SetSearchData("ACC_CD", cboBankCode.ValueList); SetSearchData("IN_BANK_NM", txtInBankName.Text); SetSearchData("IN_BANK_NO", txtInBankNo.Text); SetSearchData("IN_NAME", txtInUserName.Text); SetServiceId("SetBankAccountHistory"); } else if (rdoCard.Checked) { SetSearchData("ACC_TYPE", cboType.ValueList); SetSearchData("ACC_CD", cboCard.ValueList); SetSearchData("ACC_NO", txtAccNo.Text); SetSearchData("OUT_COMP_NM", txtOutName.Text); SetSearchData("OUT_COMP_REG_ID", txtOutRegId.Text); SetServiceId("SetCardAccountHistory"); } else { ViewMessage.Error("잘못된 선택 입니다."); } try { DTOFactory.Transaction(new AccountDTO()); DialogResult = DialogResult.OK; ViewMessage.Info("등록이 완료 되었습니다."); Close(); } catch (Exception ex) { ViewMessage.Error(ex.Message); } } else { ViewMessage.Error("첨부 파일이 없습니다."); } }
private void GetUserInfo(int rowindex, string STAT_CD) { ClearSearchData(); SetSearchData("COMP_CODE", _dtComp.Rows[rowindex]["COMP_CD"].ToString()); SetSearchData("STAT_CD", STAT_CD); SetServiceId("GetUserList"); try { DTOFactory.Transaction(new MemberDTO()); DataSet ds = DTOFactory.GetDataSet(); _dtUser = ds.Tables["ds_user"]; gd_Member.Columns.Clear(); gd_Member.DataSource = _dtUser; gd_Member.SetGridColumn(ds.Tables["ds_user_column"]); gd_Member.SelectionMode = DataGridViewSelectionMode.CellSelect; gd_Member.ReadOnly = false; gd_Member.Columns["TEL_1"].HeaderText = "연락처"; gd_Member.Columns["TEL_2"].HeaderText = "내선번호"; gd_Member.Columns["ADDR_CD"].Visible = false; gd_Member.Columns["ADDR"].Visible = false; gd_Member.Columns["STAT_CD"].Visible = false; gd_Member.Columns["RETIRE_DT"].Visible = false; DataGridViewButtonColumn bt = new DataGridViewButtonColumn() { Text = "저장", HeaderText = "", Name = "SAVE", UseColumnTextForButtonValue = true }; gd_Member.Columns.AddRange(bt); //2021-01-26 hsh - 삭제 기능을 제거 후 퇴직 기능 추가 DataGridViewButtonColumn bt2 = new DataGridViewButtonColumn() { Text = "재직".Equals(STAT_CD) ? "퇴직처리" : "전산등록", HeaderText = "", Name = "SUBMIT", UseColumnTextForButtonValue = true, ReadOnly = false }; gd_Member.Columns.AddRange(bt2); } catch (Exception ex) { ViewMessage.Error(ex.Message); } }
private void Save(object sender, EventArgs e) { DataTable dt_input = new DataTable(); dt_input.Columns.Add("PGM_ID"); dt_input.Columns.Add("PGM_NM"); dt_input.Columns.Add("PGM_DLL"); dt_input.Columns.Add("PGM_CLASS"); dt_input.Columns.Add("PGM_SVR_DLL"); dt_input.Columns.Add("PGM_SVR_CLASS"); foreach (DataGridViewRow row in gd_Program.Rows) { if (row.DefaultCellStyle.BackColor == Color.Yellow) { DataRow dr = dt_input.NewRow(); dr["PGM_ID"] = row.Cells["PGM_ID"].Value; dr["PGM_NM"] = row.Cells["PGM_NM"].Value; dr["PGM_DLL"] = row.Cells["PGM_DLL"].Value; dr["PGM_CLASS"] = row.Cells["PGM_CLASS"].Value; dr["PGM_SVR_DLL"] = row.Cells["PGM_SVR_DLL"].Value; dr["PGM_SVR_CLASS"] = row.Cells["PGM_SVR_CLASS"].Value; dt_input.Rows.Add(dr); } } ClearSearchData(); SetServiceId("SetProgramList"); DTOFactory.SetDTOTable("ds_list", dt_input); try { DTOFactory.Transaction(new AdminDTO()); DataSet ds = DTOFactory.GetDataSet(); dtProgram = ds.Tables["ds_program"]; gd_Program.DataSource = dtProgram; gd_Program.SetGridColumn(ds.Tables["ds_program_column"]); foreach (DataGridViewColumn col in gd_Program.Columns) { col.SortMode = DataGridViewColumnSortMode.NotSortable; } ViewMessage.Info("저장이 완료 되었습니다."); } catch (Exception ex) { ViewMessage.Error(ex.Message); } }