示例#1
0
        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);
            }
        }
示例#2
0
        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);
            }
        }
示例#3
0
        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("사업 등록을 완료 하였습니다.");
        }
示例#4
0
        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);
            }
        }
示例#5
0
        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);
            }
        }
示例#6
0
        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);
                }
            }
        }
示例#7
0
        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);
                            }
                        }
                    }
                }
            }
        }
示例#8
0
        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);
                }
            }
        }
示例#9
0
        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("승인 여부를 선택해주십시오.");
            }
        }
示例#10
0
文件: Calendar.cs 项目: mycadmin/UI
        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;
            }
        }
示例#11
0
        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("첨부 파일이 없습니다.");
            }
        }
示例#12
0
        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);
                }
            }
        }
示例#13
0
        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);
                }
            }
        }
示例#14
0
        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);
            }
        }
示例#15
0
        private void BtnSave_Click(object sender, EventArgs e)
        {
            string strModelId   = "";
            string strQty       = "";
            string strQtyCd     = "";
            string strUnitCost  = "";
            string strDeliDt    = "";
            string strCmt       = "";
            string strDoc       = "";
            string strVendor    = "";
            string strOrderComp = "";

            foreach (DataRow gr in dt_Order.Rows)
            {
                if (!"".Equals(gr["VENDOR_CD"].ToString()))
                {
                    strDoc       += "," + gr["ORDER_ID"].ToString();
                    strVendor    += "," + gr["VENDOR_CD"].ToString();
                    strOrderComp += "," + gr["ORDER_COMP_CD"].ToString();
                    strModelId   += "," + gr["MODEL_ID"].ToString();
                    strQty       += "," + gr["QTY"].ToString();
                    strQtyCd     += "," + gr["QTY_CD"].ToString();
                    strUnitCost  += "," + gr["UNIT_COST"].ToString();
                    string date = gr["DELI_DT"].ToString();

                    if (!"".Equals(date) && date.Length == 8)
                    {
                        date = date.Substring(0, 4) + "-" + date.Substring(4, 2) + "-" + date.Substring(6, 2);
                    }

                    strDeliDt += "," + date;

                    strCmt += "," + gr["CMT_DESC"].ToString();
                }
            }

            ClearSearchData();
            SetSearchData("DOC_ID", strDoc.Length > 0 ? strDoc.Substring(1) : strDoc);
            SetSearchData("ORDER_COMP_CD", strOrderComp.Length > 0 ? strOrderComp.Substring(1) : strOrderComp);
            SetSearchData("COMP_CD", strVendor.Length > 0 ? strVendor.Substring(1) : strVendor);
            SetSearchData("MODEL_ID", strModelId.Length > 0 ? strModelId.Substring(1) : strModelId);
            SetSearchData("QTY", strQty.Length > 0 ? strQty.Substring(1) : strQty);
            SetSearchData("QTY_CD", strQtyCd.Length > 0 ? strQtyCd.Substring(1) : strQtyCd);
            SetSearchData("UNIT_COST", strUnitCost.Length > 0 ? strUnitCost.Substring(1) : strUnitCost);
            SetSearchData("DELI_DT", strDeliDt.Length > 0 ? strDeliDt.Substring(1) : strDeliDt);
            SetSearchData("DESC", strCmt.Length > 0 ? strCmt.Substring(1) : strCmt);
            SetSearchData("USER_ID", DTOFactory.UserId);
            SetServiceId("SetOrderRequest");
            DTOFactory.Transaction(new ProductDTO());

            ViewMessage.Info("발주요청서 저장 처리가 완료 되었습니다.");
        }
示例#16
0
        private void InsertData(object sender, EventArgs e)
        {
            if (ScheduleFix)
            {
                if ("".Equals(cboUser.ValueList))
                {
                    ViewMessage.Info("담당자와 내용을 선택해 주시기 바랍니다.");
                }
                else
                {
                    ClearSearchData();
                    SetSearchData("DOC_ID", DOC_ID);
                    SetSearchData("ACCEPT_TM", DATE.ToString("yyyy-MM-dd HH:mm:ss"));
                    SetSearchData("PROC_TM", dtCreateTime.Value.ToString("yyyy-MM-dd HH:mm:ss"));
                    SetSearchData("USER_ID_LST", cboUser.ValueList);
                    SetSearchData("CRT_USER_ID", DTOFactory.UserId);
                    SetServiceId("SetScheduleManager");

                    DTOFactory.Transaction(new ReportDTO());

                    ViewMessage.Info("일정 수정을 완료 하였습니다.");

                    DialogResult = DialogResult.OK;
                    Close();
                }
            }
            else
            {
                if ("".Equals(cboUser.ValueList) || "".Equals(cboPlan.ValueList))
                {
                    ViewMessage.Info("담당자와 내용을 선택해 주시기 바랍니다.");
                }
                else
                {
                    ClearSearchData();
                    SetSearchData("DOC_ID", DOC_ID);
                    SetSearchData("ACCEPT_TM", dtCreateTime.Value.ToString("yyyy-MM-dd HH:mm:ss"));
                    SetSearchData("USER_ID_LST", cboUser.ValueList);
                    SetSearchData("DESC", cboPlan.ValueList);
                    SetSearchData("CRT_USER_ID", DTOFactory.UserId);
                    SetServiceId("SetScheduleManager");

                    DTOFactory.Transaction(new ReportDTO());

                    ViewMessage.Info("일정 등록을 완료 하였습니다.");

                    DialogResult = DialogResult.OK;
                    Close();
                }
            }
        }
示例#17
0
        private void ModelDelete(object sender, EventArgs e)
        {
            if (gd_List.SelectedRows.Count > 0)
            {
                DataRow row = _dtModel.Rows[gd_List.SelectedRows[0].Index];

                if (System.Windows.Forms.MessageBox.Show(
                        row["CST_MODEL_ID"].ToString() + " 제품의 이력을 일괄 삭제 하겠습니까?", "모델 삭제"
                        , MessageBoxButtons.YesNo) == DialogResult.Yes)
                {
                    ClearSearchData();
                    SetSearchData("COMP_CD", row["COMP_CD"]);
                    SetSearchData("MODEL_CD", row["CST_MODEL_ID"]);
                    SetServiceId("DelModelInfo");

                    try
                    {
                        DTOFactory.Transaction(new MachineDTO());

                        ViewMessage.Info("삭제가 완료 되었습니다.");
                        _dtModel.Rows.RemoveAt(gd_List.SelectedRows[0].Index);

                        txtModelId.Text     = "";
                        txtModelDesc.Text   = "";
                        txtGrp1.Text        = "";
                        txtGrp2.Text        = "";
                        txtItm.Text         = "";
                        txtSpec.Text        = "";
                        txtSpecDesc.Text    = "";
                        txtEstNo.Text       = "";
                        txtEstSubject.Text  = "";
                        txtEstUnitCost.Text = "";
                        txtEstDesc.Text     = "";

                        cboCompCode.SetItemChecked(cboComp.ValueList);
                        cbockModel.SetItemChecked("");
                        cboQtyType.SetItemChecked("");

                        if (_dtModel.Rows.Count > 0)
                        {
                            GetModelInfo(0);
                        }
                    }
                    catch (Exception ex)
                    {
                        ViewMessage.Error(ex.Message);
                    }
                }
            }
        }
示例#18
0
 private void AddVerRow(object sender, EventArgs e)
 {
     if (gd_Model.Rows.Count > 0)
     {
         DataRow dr = _dtVersion.NewRow();
         dr["MODEL_ID"] = gd_Model.SelectedRows[0].Cells["MODEL_ID"].Value;
         dr["SEQ_NO"]   = 0;
         _dtVersion.Rows.Add(dr);
     }
     else
     {
         ViewMessage.Info("해당 프로젝트에 등록된 모델이 존재하지 않습니다.");
     }
 }
示例#19
0
        private void Confirm(object sender, EventArgs e)
        {
            string Link_CD = "";

            if (!"".Equals(File_NM))
            {
                FileSender snd = new FileSender(Link_CD, File_NM);
                Link_CD = snd.GetLinkCode();
            }

            ClearSearchData();
            SetSearchData("SUBJECT", txtActSubject.Text);
            SetSearchData("TYPE1", cboActType1.ValueList);
            SetSearchData("TYPE2", cboActType2.ValueList);
            SetSearchData("STATUS", "O");
            SetSearchData("ACT_USER_ID", cboActMember.ValueList);
            SetSearchData("CFM_USER_ID", cboActConfirm.ValueList);
            SetSearchData("USER_ID", DTOFactory.UserId);
            SetSearchData("TGT_TM", dtActTarget.Value.ToString("yyyy-MM-dd"));
            SetSearchData("END_TM", "");
            SetSearchData("LINK_CD", Link_CD);
            SetSearchData("DESC", txtMemo.Text);

            SetServiceId("CreateActionList");

            try
            {
                DTOFactory.Transaction(new MemberDTO());

                if (chkMail.Checked)
                {
                    Mail.Subject  = "[업무 협조]" + txtActSubject.Text;
                    Mail.To       = DTOFactory.GetDataTable().Rows[0]["EMAIL"].ToString();
                    Mail.IsDirect = true;

                    string strBody = "아래와 같이 업무 협조 요청을 드립니다.<br><hr>";
                    strBody += txtMemo.Text.Replace("\r\n", "<br>");

                    Mail.Send(strBody);
                }

                DialogResult = DialogResult.OK;
                ViewMessage.Info("등록이 완료 되었습니다.");
                Close();
            }
            catch (Exception ex)
            {
                ViewMessage.Error(ex.Message);
            }
        }
示例#20
0
文件: Calendar.cs 项目: mycadmin/UI
        private void BtnSave_Click(object sender, EventArgs e)
        {
            ClearSearchData();

            if ("".Equals(cboItem.ValueList))
            {
                ViewMessage.Info("항목을 선택하시기 바랍니다.");
            }
            else
            {
                bool   bNew    = true;
                string chkTime = dtTime.Value.ToString("HH:mm:ss");

                foreach (DataRow row in _dtSelSch.Rows)
                {
                    if (chkTime.Equals(row["SCH_TIME"].ToString().Trim()))
                    {
                        bNew = false;
                    }
                }

                if (bNew)
                {
                    SetSearchData("USER_ID", DTOFactory.UserId);
                    SetSearchData("SCH_TM", dtTime.Value.ToString("yyyy-MM-dd HH:mm:ss"));
                    SetSearchData("PLAN_CD", cboItem.ValueList);
                    SetSearchData("DESC", txtDesc.Text);
                    SetServiceId("SetSchedule");

                    try
                    {
                        DTOFactory.Transaction(new MemberDTO());

                        ViewMessage.Info("일정을 등록하였습니다.");
                        pnlSetSchedule.Visible = false;

                        SetCalendar();
                    }
                    catch (Exception ex)
                    {
                        ViewMessage.Error(ex.Message);
                    }
                }
                else
                {
                    ViewMessage.Warning("동일한 시간에 일정이 등록되어 있습니다.");
                }
            }
        }
示例#21
0
        private void Card_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            DataGridView view = (DataGridView)sender;
            int          row  = gd_Bank.SelectedCells[0].RowIndex;

            if ("DEL".Equals(view.Columns[e.ColumnIndex].Name))
            {
                if (System.Windows.Forms.MessageBox.Show(
                        " 카드 정보를 삭제 하시겠습니까?", "카드 제거"
                        , MessageBoxButtons.YesNo) == DialogResult.Yes)
                {
                    ClearSearchData();
                    SetSearchData("ACC_CD", view.Rows[e.RowIndex].Cells["ACC_CD"].Value.ToString());
                    SetSearchData("OUT_BANK)NM", gd_Bank.Rows[row].Cells["BNK_COMP_CD"].Value);
                    SetSearchData("OUT_BANK_NO", gd_Bank.Rows[row].Cells["BNK_NO"].Value);
                    SetSearchData("UPT_USER_ID", DTOFactory.UserId);
                    SetServiceId("DelCardAccountList");

                    try
                    {
                        DTOFactory.Transaction(new AccountDTO());

                        ViewMessage.Info("카드 정보를 제거 하였습니다.");

                        _dtCard            = DTOFactory.GetDataTable("ds_card");
                        gd_Card.DataSource = _dtCard;
                    }
                    catch (Exception ex)
                    {
                        ViewMessage.Error(ex.Message);
                    }
                }
            }
            else if ("SAVE".Equals(view.Columns[e.ColumnIndex].Name))
            {
                var frm = new Popup.AccountCardInsertPopup()
                {
                    ACC_CD      = view.Rows[e.RowIndex].Cells["ACC_CD"].Value.ToString(),
                    BANK_ACC_CD = gd_Bank.Rows[row].Cells["ACC_CD"].Value.ToString()
                };

                if (frm.ShowDialog() == DialogResult.OK)
                {
                    ShowBank();
                }
            }
        }
示例#22
0
        private void Bank_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            DataGridView view = (DataGridView)sender;

            if ("VIEW".Equals(view.Columns[e.ColumnIndex].Name))
            {
                new FileGet(view.Rows[e.RowIndex].Cells["LINK_CD"].Value.ToString());
            }
            else if ("DEL".Equals(view.Columns[e.ColumnIndex].Name))
            {
                if (System.Windows.Forms.MessageBox.Show(
                        " 통장 정보를 삭제 하시겠습니까?", "통장 제거"
                        , MessageBoxButtons.YesNo) == DialogResult.Yes)
                {
                    ClearSearchData();
                    SetSearchData("ACC_CD", view.Rows[e.RowIndex].Cells["ACC_CD"].Value.ToString());
                    SetSearchData("UPT_USER_ID", DTOFactory.UserId);
                    SetServiceId("DelBankAccountList");

                    try
                    {
                        DTOFactory.Transaction(new AccountDTO());

                        ViewMessage.Info("통장 정보를 제거 하였습니다.");

                        _dtBank            = DTOFactory.GetDataTable("ds_bank");
                        gd_Bank.DataSource = _dtBank;
                    }
                    catch (Exception ex)
                    {
                        ViewMessage.Error(ex.Message);
                    }
                }
            }
            else if ("SAVE".Equals(view.Columns[e.ColumnIndex].Name))
            {
                var frm = new Popup.AccountBankInsertPopup()
                {
                    ACC_CD = view.Rows[e.RowIndex].Cells["ACC_CD"].Value.ToString()
                };

                if (frm.ShowDialog() == DialogResult.OK)
                {
                    ShowBank();
                }
            }
        }
示例#23
0
        private void ModelSave(object sender, EventArgs e)
        {
            DataRow row = _dtModel.Rows[gd_List.SelectedRows[0].Index];

            ClearSearchData();
            SetSearchData("MODEL_ID", txtModelId.Text);
            SetSearchData("MODEL_CD", txtModelCode.Text);
            SetSearchData("MODEL_NM", txtModelName.Text);
            SetSearchData("MMDEL_TYPE", cboType.ValueList);
            SetSearchData("PRODUCT_TYPE", cboProductType.ValueList);
            SetSearchData("SPEC_W", "".Equals(txtSpecW.Text) ? 0 : float.Parse(txtSpecW.Text));
            SetSearchData("SPEC_D", "".Equals(txtSpecD.Text) ? 0 : float.Parse(txtSpecD.Text));
            SetSearchData("SPEC_H", "".Equals(txtSpecH.Text) ? 0 : float.Parse(txtSpecH.Text));
            SetSearchData("YENDOR_CD", cboVendor.ValueList);
            SetSearchData("MATERIAL_CD", cboMaterial.ValueList);
            SetSearchData("PLAN_CD", row["PLAN_CD"]);
            SetSearchData("ESTIMATE_CD", row["ESTIMATE_CD"]);
            SetSearchData("LINK_CODE", row["LINK_CD"]);
            SetSearchData("PROJECT_ID", cboProject.ValueList);
            SetSearchData("USER_ID", DTOFactory.UserId);
            SetServiceId("SetModelInfo");

            try
            {
                DTOFactory.Transaction(new MachineDTO());
                DataTable dt = DTOFactory.GetDataTable();

                DataRow row2 = dt.Rows[0];

                pnlPlan.Enabled     = true;
                pnlEstimate.Enabled = true;
                pnlDocument.Enabled = true;

                foreach (DataColumn col in dt.Columns)
                {
                    row[col.ColumnName] = row2[col.ColumnName].ToString();
                }
                txtModelId.Text = row2["MODEL_ID"].ToString();

                ViewMessage.Info("저장이 완료 되었습니다.");
            }
            catch (Exception ex)
            {
                ViewMessage.Error(ex.Message);
            }
        }
示例#24
0
        private void SaveCompInfo(object sender, EventArgs e)
        {
            ClearSearchData();
            SetSearchData("COMP_CODE", gd_List.SelectedRows[0].Cells["COMP_CD"].Value);
            SetSearchData("COMP_NAME", txtCompName.Text);
            SetSearchData("COMP_TYPE", "M");
            SetSearchData("REG_ID", txtRegId.Text);
            SetSearchData("USER_NAME", txtName.Text);
            SetSearchData("GRADE_NM", txtGrade.Text);
            SetSearchData("ADDR_CODE", txtAddrCode.Text);
            SetSearchData("ADDR", txtAddr.Text);
            SetSearchData("TEL_1", txtTel.Text);
            SetSearchData("FAX", txtFax.Text);
            SetSearchData("HOMEPAGE", txtHomePage.Text);
            SetSearchData("EMAIL", txtEmail.Text);
            SetSearchData("UPT_USER_ID", DTOFactory.UserId);
            SetServiceId("SetCompInfo");

            try
            {
                DTOFactory.Transaction(new MemberDTO());
                DataSet ds = DTOFactory.GetDataSet();

                _dtComp            = ds.Tables["ds_comp"];
                gd_List.DataSource = _dtComp;
                _dtUser.Clear();

                txtCompName.Text = "";
                txtRegId.Text    = "";
                txtName.Text     = "";
                txtGrade.Text    = "";
                txtAddrCode.Text = "";
                txtAddr.Text     = "";
                txtTel.Text      = "";
                txtFax.Text      = "";
                txtHomePage.Text = "";
                txtEmail.Text    = "";

                ViewMessage.Info("저장이 완료되었습니다.");
            }
            catch (Exception ex)
            {
                ViewMessage.Error(ex.Message);
            }
        }
示例#25
0
        private void SetVisitHistoryItem(object sender, EventArgs e)
        {
            ClearSearchData();
            SetSearchData("CST_COMP_CD", cboComp.ValueList);
            SetSearchData("CST_USER_ID", cboCstUser.ValueList);
            SetSearchData("SUBJECT", txtSubject.Text);
            SetSearchData("FROM_DT", CalStartTm.Value.ToString("yyyy-MM-dd HH:mm:ss"));
            SetSearchData("TO_DT", CalEndTm.Value.ToString("yyyy-MM-dd HH:mm:ss"));
            SetSearchData("SITE_NM", txtSite.Text);
            SetSearchData("PRD_NM", txtProduct.Text);
            SetSearchData("USER_ID_LST", cbockVisitUser.ValueList);
            SetSearchData("DESC", txtDesc.Text);
            SetSearchData("CRT_USER_ID", DTOFactory.UserId);
            SetServiceId("SetVisitHistory");

            try
            {
                DTOFactory.Transaction(new ReportDTO());

                DataRow row = _dtList.Rows[gd_List.SelectedRows[0].Index];
                row["SUBJECT"]            = txtSubject.Text;
                row["SITE_NM"]            = txtSite.Text;
                row["PRD_NM"]             = txtProduct.Text;
                row["CMT_DESC"]           = txtDesc.Text;
                row["CST_USER_ID"]        = cboCstUser.ValueList;
                row["VISIT_USER_ID_LVAL"] = cbockVisitUser.ValueList;
                row["START_TM"]           = CalStartTm.Value.ToString("yyyy-MM-dd HH:mm:ss");
                row["END_TM"]             = CalEndTm.Value.ToString("yyyy-MM-dd HH:mm:ss");

                ViewMessage.Info("저장이 완료 되었습니다.");

                if (dtTo.Value < CalEndTm.Value)
                {
                    dtTo.Value = CalEndTm.Value;
                }

                GetVisitHistory(btnSearch, null);
            }
            catch (Exception ex)
            {
                ViewMessage.Error(ex.Message);
            }
        }
示例#26
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            ClearSearchData();

            SetSearchData("DOC_TYP_CD", DOC_TYP_CD);
            SetSearchData("CRT_USER_ID", DTOFactory.UserId);
            SetSearchData("START_TM", dtFrom.Value.ToString("yyyy-MM-dd"));
            SetSearchData("END_TM", dtTo.Value.ToString("yyyy-MM-dd"));
            SetSearchData("SUBJECT", txtSite.Text);
            SetSearchData("USER_ID_LVAL", cbockMember.ValueList);
            SetSearchData("SITE_NM", txtSubject.Text);

            SetServiceId("SetDocList");

            DataTable _dt = new DataTable();

            _dt.Columns.Add("GRP_NM");
            _dt.Columns.Add("SUBJECT");
            _dt.Columns.Add("DOC_DESC");

            for (int i = 0; i < lstLbSch.Count; i++)
            {
                DataRow row = _dt.NewRow();
                row["GRP_NM"]   = lstLbSch[i].Text;
                row["DOC_DESC"] = lstTxtSch[i].Text;
                _dt.Rows.Add(row);
            }

            DTOFactory.SetDTOTable("ds_list", _dt.Copy());

            try
            {
                DTOFactory.Transaction(new DocDTO());

                DialogResult = DialogResult.OK;
                ViewMessage.Info("문서 등록이 완료 되었습니다.");
                Close();
            }
            catch (Exception ex)
            {
                ViewMessage.Error(ex.Message);
            }
        }
示例#27
0
        //문서 수정
        private void DocumentControl(object sender, DataGridViewCellEventArgs e)
        {
            DataGridView view = (DataGridView)sender;

            if (e.RowIndex > -1)
            {
                if ("FILE_DESC".Equals(view.Columns[e.ColumnIndex].Name))
                {
                    FileGet get = new FileGet(view.Rows[e.RowIndex].Cells["LINK_DESC"].Value.ToString());
                    get.Close();
                }
                else if ("CREATE".Equals(view.Columns[e.ColumnIndex].Name))
                {
                    OpenFileDialog frm = new OpenFileDialog();

                    if (frm.ShowDialog() == DialogResult.OK)
                    {
                        string desc = Microsoft.VisualBasic.Interaction.InputBox("File 변경사항을 입력하시오.", "문서 등록");
                        new FileSender(view.Rows[e.RowIndex].Cells["LINK_CD"].Value.ToString(), frm.FileName + "*" + view.Rows[e.RowIndex].Cells["FILE_DESC"].Value.ToString());

                        ClearSearchData();
                        SetSearchData("LINK_CODE", view.Rows[e.RowIndex].Cells["LINK_CD"].Value.ToString());
                        SetSearchData("CRT_USER_ID", DTOFactory.UserId);
                        SetSearchData("DESC", desc);
                        SetSearchData("SEQ_NO", (float.Parse(view.Rows[e.RowIndex].Cells["REV_NO"].Value.ToString()) + 0.1).ToString());
                        SetSearchData("GRP_NO", gd_schedule.SelectedCells.Count > 0 ? gd_schedule.Rows[gd_schedule.SelectedCells[0].RowIndex].Cells["SCH_DESC"].Value : "사업 접수");
                        SetServiceId("InsertBusinessDocument");

                        try
                        {
                            DTOFactory.Transaction(new ReportDTO());

                            ViewMessage.Info("문서 등록이 완료 되었습니다.");
                            gd_Document.DataSource = DTOFactory.GetDataTable();
                        }
                        catch (Exception ex)
                        {
                            ViewMessage.Error(ex.Message);
                        }
                    }
                }
            }
        }
示例#28
0
        private void Save(object sender, EventArgs e)
        {
            ClearSearchData();

            if ("".Equals(cboType.ValueList))
            {
                ViewMessage.Info("항목을 선택 해 주시기 바랍니다.");
                return;
            }
            if ("".Equals(cboCard.ValueList))
            {
                ViewMessage.Info("카드사를 선택 해 주시기 바랍니다.");
                return;
            }
            if ("".Equals(txtCardCode.Text))
            {
                ViewMessage.Info("카드 번호를 선택 해 주시기 바랍니다.");
                return;
            }

            SetSearchData("ACC_CD", ACC_CD);
            SetSearchData("ACC_TYPE", cboType.ValueList);
            SetSearchData("OUT_BANK_NM", cboBank.ValueList);
            SetSearchData("CARD_NM", cboCard.ValueList);
            SetSearchData("CARD_NO", txtCardCode.Text);
            SetSearchData("USER_ID", cboUser.ValueList);
            SetSearchData("ACCOUNT_DESC", txtCardDesc.Text);
            SetSearchData("UPT_USER_ID", DTOFactory.UserId);
            SetServiceId("SetCardAccountList");

            try
            {
                DTOFactory.Transaction(new AccountDTO());

                DialogResult = DialogResult.OK;
                ViewMessage.Info("등록이 완료 되었습니다.");
                Close();
            }
            catch (Exception ex)
            {
                ViewMessage.Error(ex.Message);
            }
        }
示例#29
0
        private void AddCompRow(object sender, EventArgs e)
        {
            var frm = new Popup.FrmInsertGovComp();

            if (frm.ShowDialog() == DialogResult.OK)
            {
                DataRow dr = _dtComp.NewRow();

                dr["COMP_NM"] = frm.CompName;
                dr["ADDR_CD"] = frm.AddrCode;
                dr["ADDR"]    = frm.Addr;
                dr["WEB"]     = frm.HomePage;
                _dtComp.Rows.Add(dr);


                ClearSearchData();
                SetSearchData("COMP_NAME", frm.CompName);
                SetSearchData("COMP_TYPE", "G");
                SetSearchData("ADDR_CODE", frm.AddrCode);
                SetSearchData("ADDR", frm.Addr);
                SetSearchData("HOMEPAGE", frm.HomePage);
                SetSearchData("UPT_USER_ID", DTOFactory.UserId);
                SetServiceId("SetCompInfo");

                try
                {
                    DTOFactory.Transaction(new MemberDTO());
                    DataSet ds = DTOFactory.GetDataSet();

                    ViewMessage.Info("저장이 완료되었습니다.");

                    _dtComp            = ds.Tables["ds_comp"];
                    gd_List.DataSource = _dtComp;
                    _dtUser.Rows.Clear();
                }
                catch (Exception ex)
                {
                    ViewMessage.Error(ex.Message);
                }
            }
        }
示例#30
0
        private void AddMemberRow(object sender, EventArgs e)
        {
            var frm = new Popup.FrmInsertGovMember();

            if (frm.ShowDialog() == DialogResult.OK)
            {
                DataRow dr = _dtUser.NewRow();

                dr["USER_NM"]   = frm.UserName;
                dr["GRADE_CD"]  = frm.Grade;
                dr["LINE_ID"]   = frm.Line;
                dr["WORK_DESC"] = frm.Work;
                dr["TEL_1"]     = frm.Tel;
                dr["EMAIL"]     = frm.Mail;
                _dtUser.Rows.Add(dr);

                ClearSearchData();
                SetSearchData("USER_ID", "");
                SetSearchData("USER_NAME", frm.UserName);
                SetSearchData("GRADE_NM", frm.Grade);
                SetSearchData("COMP_CODE", _dtComp.Rows[gd_List.SelectedCells[0].RowIndex]["COMP_CD"].ToString());
                SetSearchData("COMP_TYPE", "G");
                SetSearchData("USER_TYPE", "G");
                SetSearchData("LINE_ID", frm.Line);
                SetSearchData("WORK_DESC", frm.Work);
                SetSearchData("TEL_1", frm.Tel);
                SetSearchData("EMAIL", frm.Mail);
                SetSearchData("UPT_USER_ID", DTOFactory.UserId);
                SetServiceId("SetUserInfo");

                try
                {
                    DTOFactory.Transaction(new MemberDTO());
                    ViewMessage.Info("등록이 완료 되었습니다.");
                }
                catch (Exception ex)
                {
                    ViewMessage.Error(ex.Message);
                }
            }
        }