예제 #1
0
        /// <summary>
        /// 청구확정시 데이터를 갱신합니다.
        /// </summary>
        private void SendComplate(string date, string seq, string file)
        {
            try
            {
                //취소승인 상계처리때문에 + 1 을 했다.
                DataTable[] dtParm  = new DataTable[dt.Rows.Count];
                int         indexer = 0;



                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    string sale_date = Basic.MaskReplace(dt.Rows[i]["SALE_DATE"].ToString().Trim());
                    string facility  = dt.Rows[i]["FACILITY_CODE"].ToString().Trim();
                    string posno     = dt.Rows[i]["POS_NO"].ToString().Trim();
                    string billno    = dt.Rows[i]["BILL_NO"].ToString().Trim();
                    string saleyn    = dt.Rows[i]["SALE_YN"].ToString().Trim();
                    string payseq    = dt.Rows[i]["PAY_SEQ"].ToString().Trim();



                    dtParm[indexer] = DataLayer.GetDataTableParameter(DataLayer.DatatableStyle.Parameter);

                    dtParm[indexer].TableName = "PKG_JIAAI02.PR_03";

                    dtParm[indexer].Rows.Add(new object[] { "V_REG_DATE", date });
                    dtParm[indexer].Rows.Add(new object[] { "V_REG_SEQ", seq });
                    dtParm[indexer].Rows.Add(new object[] { "V_REG_FILE_NAME", file });
                    dtParm[indexer].Rows.Add(new object[] { "V_SALE_DATE", sale_date });
                    dtParm[indexer].Rows.Add(new object[] { "V_BIZ_CODE", Parm.CurrentUserInformation.BizInfo.BizCode });
                    dtParm[indexer].Rows.Add(new object[] { "V_FACILITY_CODE", facility });
                    dtParm[indexer].Rows.Add(new object[] { "V_POS_NO", posno });
                    dtParm[indexer].Rows.Add(new object[] { "V_BILL_NO", billno });
                    dtParm[indexer].Rows.Add(new object[] { "V_SALE_YN", saleyn });
                    dtParm[indexer].Rows.Add(new object[] { "V_PAY_SEQ", payseq });
                    dtParm[indexer].Rows.Add(new object[] { "V_EMP_NO", Parm.CurrentUserInformation.id });
                    dtParm[indexer].Rows.Add(new object[] { "V_IP", Parm.CurrentUserInformation.ip });
                    indexer++;
                }


                DataSet ds = DataLayer.AddProdedcure(dtParm);

                string vRet = DataLayer.ExecuteSpScalaTransaction(ds, "OK", DataLayer.MessageEncoding.Default);

                if (vRet != "OK")
                {
                    if (System.IO.File.Exists(Log.FilePath + "\\" + Log.FileName))
                    {
                        System.IO.File.Delete(Log.FilePath + "\\" + Log.FileName);
                    }

                    throw new Exception(vRet);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
예제 #2
0
        /// <summary>
        /// 입력함수
        /// </summary>
        private void Inserts()
        {
            try
            {
                if (!ISCheckData(JobStyle.INSERT))
                {
                    return;
                }
                //에니메이션 과 커서의 모양을 바궈준다.
                Basic.SetCursor(this, false);
                Basic.LoadParentFunction(this, "저장 중 입니다..", true);

                DataRow[] r = dt.Select("CHECK_YN = 'Y'");

                int         index       = r.Length;
                int         indexCnt    = 0;
                DataTable[] dtProcedure = new DataTable[index];

                //DataTable dtparmInsert = DataLayer.GetDataTableParameter(DataLayer.DatatableStyle.Parameter);
                for (int i = 0; i < r.Length; i++)
                {
                    int nCalc = int.Parse(r[i]["D_SALE_AMT"].ToString());
                    nCalc = nCalc - nCalc * 2;

                    dtProcedure[i]           = DataLayer.GetDataTableParameter(DataLayer.DatatableStyle.Parameter);
                    dtProcedure[i].TableName = "PKG_JNAAI03.PR_02";
                    dtProcedure[i].Rows.Add(new object[] { "V_BIZ_CODE", Parm.CurrentUserInformation.BizInfo.BizCode });
                    dtProcedure[i].Rows.Add(new object[] { "V_POS_NO", "99" });
                    dtProcedure[i].Rows.Add(new object[] { "V_SID_BAR_CODE", this.txtBarcode.Text.Trim() });
                    dtProcedure[i].Rows.Add(new object[] { "V_CALC_AMT", nCalc });
                    dtProcedure[i].Rows.Add(new object[] { "V_U_EMP_NO", Parm.CurrentUserInformation.No });
                    dtProcedure[i].Rows.Add(new object[] { "V_U_IP", Parm.CurrentUserInformation.ip });
                }

                DataSet ds     = DataLayer.AddProdedcure(dtProcedure);
                string  Result = DataLayer.ExecuteSpScalaTransaction(ds, "OK", DataLayer.MessageEncoding.Default);

                //프로시져 에러라면 빠져나간다.
                if (Result.Trim() != "OK")
                {
                    Basic.ShowMessage(3, Result);
                    return;
                }

                //입력한 데이터를 조회 를 합니다...
                Selects();

                Basic.ShowMessage(1, "입력 하였습니다.");
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                Basic.SetCursor(this, true);
                Basic.LoadParentFunction(this, "", false);
            }
        }
예제 #3
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            try
            {
                DataRow[] r = dt.Select("CHECK_YN = 'Y'");

                if (r == null || r.Length <= 0)
                {
                    Basic.ShowMessage(2, "저장할 데이터가 없습니다.");
                    return;
                }

                if (Basic.ShowMessageQuestion("저장하시겠습니까?") == DialogResult.No)
                {
                    return;
                }
                Basic.SetCursor(this, false);

                DataTable[] dtParm = new DataTable[r.Length];

                for (int i = 0; i < r.Length; i++)
                {
                    dtParm[i]           = DataLayer.GetDataTableParameter(DataLayer.DatatableStyle.Parameter);
                    dtParm[i].TableName = "PKG_AEAAI11.PR_10";
                    dtParm[i].Rows.Add(new object[] { "V_CERT_ISSUE_NO", r[i]["CERT_ISSUE_NO"].ToString().Trim() });
                    dtParm[i].Rows.Add(new object[] { "V_EMP_NO", Parm.CurrentUserInformation.id });
                    dtParm[i].Rows.Add(new object[] { "V_IP", Parm.CurrentUserInformation.ip });
                }

                DataSet ds = DataLayer.AddProdedcure(dtParm);

                Basic.SetCursor(this, false);
                Basic.LoadParentFunction(this, "입력 중 입니다..", true);

                string g = DataLayer.ExecuteSpScalaTransaction(ds, "OK", DataLayer.MessageEncoding.Default);

                Basic.SetCursor(this, true);
                Basic.LoadParentFunction(this, "", false);

                if (g != "OK")
                {
                    Basic.ShowMessage(3, g);
                    return;
                }

                Basic.ShowMessage(1, "저장 하였습니다.");

                this.Selects(false);
            }
            catch (Exception ex)
            {
                Basic.ShowMessage(3, ex.Message);
            }
            finally
            {
                Basic.SetCursor(this, true);
                Basic.LoadParentFunction(this, "", false);
            }
        }
예제 #4
0
        /// <summary>
        /// 설정저장버튼을 눌렀을 경우
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        private void btnUpdate_Click(object sender, EventArgs e)
        {
            try
            {
                DataTable dttmp = dtMutil.GetChanges();

                if (dttmp == null || dttmp.Rows.Count <= 0)
                {
                    Basic.ShowMessage(1, "변경된 데이터가 없습니다.");
                    return;
                }

                if (Basic.ShowMessageQuestion("변경된 데이터를 저장 하시겠습니까?") == DialogResult.No)
                {
                    return;
                }

                DataTable[] dtParm = new DataTable[dttmp.Rows.Count];

                for (int i = 0; i < dttmp.Rows.Count; i++)
                {
                    string facilitycode      = dttmp.Rows[i]["FACILITY_CODE"].ToString().Trim();
                    string posno             = dttmp.Rows[i]["POS_NO"].ToString().Trim();
                    string multifacilitycode = dttmp.Rows[i]["MULTI_FACILITY_CODE"].ToString().Trim();
                    string multiposno        = dttmp.Rows[i]["MULTI_POS_NO"].ToString().Trim();
                    string displayseq        = dttmp.Rows[i]["DISPLAY_SEQ"].ToString().Trim();
                    displayseq = displayseq == "" ? "0": displayseq;

                    dtParm[i]           = DataLayer.GetDataTableParameter(DataLayer.DatatableStyle.Parameter);
                    dtParm[i].TableName = "PKG_JAAAI12.PR_05";
                    dtParm[i].Rows.Add(new object[] { "V_BIZ_CODE", Parm.CurrentUserInformation.BizInfo.BizCode });
                    dtParm[i].Rows.Add(new object[] { "V_FACILITY_CODE", facilitycode });
                    dtParm[i].Rows.Add(new object[] { "V_POS_NO", posno });
                    dtParm[i].Rows.Add(new object[] { "V_MULTI_FACILITY_CODE", multifacilitycode });
                    dtParm[i].Rows.Add(new object[] { "V_MULTI_POS_NO", multiposno });
                    dtParm[i].Rows.Add(new object[] { "V_DISPLAY_SEQ", displayseq });
                    dtParm[i].Rows.Add(new object[] { "V_U_EMP_NO", BizCommon.Parm.CurrentUserInformation.id });
                    dtParm[i].Rows.Add(new object[] { "V_U_IP", BizCommon.Parm.CurrentUserInformation.ip });
                }

                DataSet ds = DataLayer.AddProdedcure(dtParm);
                string  g  = DataLayer.ExecuteSpScalaTransaction(ds, "OK", DataLayer.MessageEncoding.Default);

                if (g != "OK")
                {
                    Basic.ShowMessage(3, g);
                    return;
                }

                fnSelect();

                Basic.ShowMessage(1, "변경 하였습니다.");
            }
            catch (Exception ex)
            {
                Basic.ShowMessage(3, ex.Message);
            }
        }
예제 #5
0
        /// <summary>
        /// 설정 저장 버튼을 눌렀을 경우
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        private void btnSave_Click(object sender, EventArgs e)
        {
            try
            {
                if (this.gridViewPos.RowCount <= 0)
                {
                    Basic.ShowMessage(2, "등록된 메뉴가 없습니다.");
                    return;
                }

                DataTable dt = dtPosView.GetChanges();

                if (dt == null)
                {
                    Basic.ShowMessage(1, "변경된 데이터가 없습니다.");
                    return;
                }



                string faicilitycode = dt.Rows[0]["FACILITY_CODE"].ToString().Trim();
                string menugroupno   = dt.Rows[0]["MENU_GROUP_NO"].ToString().Trim();

                DataTable[] dtProcedure = new DataTable[dt.Rows.Count];
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    string menucode   = dt.Rows[i]["MENU_CODE"].ToString().Trim();
                    string displayseq = dt.Rows[i]["DISPLAY_SEQ"].ToString().Trim();

                    dtProcedure[i]           = DataLayer.GetDataTableParameter(DataLayer.DatatableStyle.Parameter);
                    dtProcedure[i].TableName = "PKG_JAAAi13.PR_04";
                    dtProcedure[i].Rows.Add(new object[] { "V_BIZ_CODE", Parm.CurrentUserInformation.BizInfo.BizCode });
                    dtProcedure[i].Rows.Add(new object[] { "V_FACILITY_CODE", faicilitycode });
                    dtProcedure[i].Rows.Add(new object[] { "V_MENU_GROUP_NO", menugroupno });
                    dtProcedure[i].Rows.Add(new object[] { "V_MENU_CODE", menucode });
                    dtProcedure[i].Rows.Add(new object[] { "V_DISPLAY_SEQ", displayseq });
                    dtProcedure[i].Rows.Add(new object[] { "V_U_EMP_NO", BizCommon.Parm.CurrentUserInformation.id });
                    dtProcedure[i].Rows.Add(new object[] { "V_U_IP", BizCommon.Parm.CurrentUserInformation.ip });
                }

                DataSet ds = DataLayer.AddProdedcure(dtProcedure);
                string  g  = DataLayer.ExecuteSpScalaTransaction(ds, "OK", DataLayer.MessageEncoding.Default);

                if (g != "OK")
                {
                    Basic.ShowMessage(3, g);
                    return;
                }
                dtMenu.RejectChanges();
                dtMenu.AcceptChanges();
                fnSelect(faicilitycode, menugroupno, true);
                Basic.ShowMessage(1, "수정 하였습니다..");
            }
            catch (Exception ex)
            {
                Basic.ShowMessage(3, ex.Message);
            }
        }
예제 #6
0
        /// <summary>
        /// 조회 함수 입니다.
        /// </summary>
        private void Move_Right()
        {
            try
            {
                //에니메이션 과 커서의 모양을 바궈준다.
                Basic.SetCursor(this, false);
                Basic.LoadParentFunction(this, "입력 중 입니다..", true);

                DataRow[] drLeftY = ((DataTable)this.gridLeft.DataSource).Select("CHK = 'Y'");

                int forCnt = drLeftY.Length;

                if (forCnt <= 0)
                {
                    Basic.ShowMessage(1, "선택된 데이터가 없습니다.");
                    return;
                }

                DataTable[] dtProcedure = new DataTable[forCnt];

                string Facilitycode = this.lupFacilitycodeSelect.EditValue.ToString().Trim();

                for (int i = 0; i < forCnt; i++)
                {
                    dtProcedure[i] = DataLayer.GetDataTableParameter(DataLayer.DatatableStyle.Parameter);

                    string TransFacilityCode = drLeftY[i]["FACILITY_CODE"].ToString().Trim();

                    dtProcedure[i].Rows.Add(new object[] { "V_BIZ_CODE", Parm.CurrentUserInformation.BizInfo.BizCode });
                    dtProcedure[i].Rows.Add(new object[] { "V_FACILITY_CODE", Facilitycode });
                    dtProcedure[i].Rows.Add(new object[] { "V_TRANS_FACILITY_CODE", TransFacilityCode });
                    dtProcedure[i].Rows.Add(new object[] { "V_U_EMP_NO", BizCommon.Parm.CurrentUserInformation.id });
                    dtProcedure[i].Rows.Add(new object[] { "V_U_IP", BizCommon.Parm.CurrentUserInformation.ip });
                    dtProcedure[i].TableName = "PKG_DAAAI16.PR_10";
                }

                DataSet ds = DataLayer.AddProdedcure(dtProcedure);
                string  g  = DataLayer.ExecuteSpScalaTransaction(ds, "OK", DataLayer.MessageEncoding.Default);

                if (g != "OK")
                {
                    Basic.ShowMessage(3, g);
                    return;
                }

                Selects(true);
                Basic.ShowMessage(1, "완료 하였습니다..");
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                Basic.SetCursor(this, true);
                Basic.LoadParentFunction(this, "", false);
            }
        }
예제 #7
0
        /// <summary>
        /// 삭제버튼클릭
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        private void picDelete_Click(object sender, EventArgs e)
        {
            try
            {
                this.picDelete.Focus();
                if (dtEmp.Rows.Count <= 0 || this.gridViewEmp.RowCount <= 0 || this.gridViewEmp.FocusedRowHandle < 0)
                {
                    Basic.ShowMessage(1, "사원이 선택되지 않았습니다.");
                    return;
                }

                DataRow[] r = dtRes.Select("CHK = 'Y'");

                if (r.Length <= 0)
                {
                    Basic.ShowMessage(1, "데이터가 선택되지 안았습니다.");
                    return;
                }


                DataTable[] dtProcedure = new DataTable[r.Length];
                string      empno       = this.gridViewEmp.GetRowCellValue(this.gridViewEmp.FocusedRowHandle, "EMP_NO").ToString().Trim();
                int         index       = 0;
                for (int j = 0; j < r.Length; j++)
                {
                    string projectid = r[j]["PROJECT_ID"].ToString().Trim();
                    string type      = r[j]["FACILITY_TYPE"].ToString().Trim();
                    dtProcedure[index]           = DataLayer.GetDataTableParameter(DataLayer.DatatableStyle.Parameter);
                    dtProcedure[index].TableName = "PKG_JAAAI04.PR_04";
                    dtProcedure[index].Rows.Add(new object[] { "V_BIZ_CODE", Parm.CurrentUserInformation.BizInfo.BizCode });
                    dtProcedure[index].Rows.Add(new object[] { "V_EMP_NO", empno });
                    dtProcedure[index].Rows.Add(new object[] { "V_PROJECT_ID", projectid });
                    dtProcedure[index].Rows.Add(new object[] { "V_FACILITY_TYPE", type });
                    index++;
                }

                DataSet ds = DataLayer.AddProdedcure(dtProcedure);
                string  g  = DataLayer.ExecuteSpScalaTransaction(ds, "OK", DataLayer.MessageEncoding.Default);

                if (g != "OK")
                {
                    Basic.ShowMessage(3, g);
                    return;
                }

                fnSelect(empno);
                dtType.RejectChanges();
                dtProject.RejectChanges();
                dtType.AcceptChanges();
                dtProject.AcceptChanges();
                Basic.ShowMessage(1, "삭제 하였습니다.");
            }
            catch (Exception ex)
            {
                Basic.ShowMessage(3, ex.Message);
            }
        }
예제 #8
0
        private void picDelete_Click(object sender, EventArgs e)
        {
            try
            {
                this.picDelete.Focus();
                DataRow[] r = dtMutil.Select("CHK = 'Y'");

                if (this.gridViewMulti.RowCount <= 0 || dtMutil.Rows.Count <= 0)
                {
                    Basic.ShowMessage(1, "삭제할 멀티영업장이 없습니다.");
                    return;
                }
                else if (r.Length <= 0)
                {
                    Basic.ShowMessage(1, "삭제할 멀티영업장이 선택되지 않았습니다.");
                    return;
                }
                if (Basic.ShowMessageQuestion("멀티영업장을 삭제 하시겠습니까?") == DialogResult.No)
                {
                    return;
                }

                DataTable[] dtProcedure = new DataTable[r.Length];

                for (int i = 0; i < r.Length; i++)
                {
                    string facilitycode  = r[i]["FACILITY_CODE"].ToString().Trim();
                    string posno         = r[i]["POS_NO"].ToString().Trim();
                    string multifacility = r[i]["MULTI_FACILITY_CODE"].ToString().Trim();
                    string multiposno    = r[i]["MULTI_POS_NO"].ToString().Trim();

                    dtProcedure[i]           = DataLayer.GetDataTableParameter(DataLayer.DatatableStyle.Parameter);
                    dtProcedure[i].TableName = "PKG_JAAAI12.PR_04";
                    dtProcedure[i].Rows.Add(new object[] { "V_BIZ_CODE", Parm.CurrentUserInformation.BizInfo.BizCode });
                    dtProcedure[i].Rows.Add(new object[] { "V_FACILITY_CODE", facilitycode });
                    dtProcedure[i].Rows.Add(new object[] { "V_POS_NO", posno });
                    dtProcedure[i].Rows.Add(new object[] { "V_MULTI_FACILITY_CODE", multifacility });
                    dtProcedure[i].Rows.Add(new object[] { "V_MULTI_POS_NO", multiposno });
                }

                DataSet ds = DataLayer.AddProdedcure(dtProcedure);
                string  g  = DataLayer.ExecuteSpScalaTransaction(ds, "OK", DataLayer.MessageEncoding.Default);

                if (g != "OK")
                {
                    Basic.ShowMessage(3, g);
                    return;
                }
                fnSelect();
                Basic.ShowMessage(1, "삭제 했습니다.");
            }
            catch (Exception ex)
            {
                Basic.ShowMessage(3, ex.Message);
            }
        }
예제 #9
0
        /// <summary>
        /// 저장버튼클릭
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        private void simpleButton1_Click(object sender, EventArgs e)
        {
            try
            {
                if (this.grid.DataSource == null)
                {
                    return;
                }

                DataTable tmp = ((DataTable)this.grid.DataSource).GetChanges();

                if (tmp == null || tmp.Rows.Count <= 0)
                {
                    Basic.ShowMessage(1, "변경된 데이터가 없습니다.");
                    return;
                }

                DataTable[] dtProcedure = new DataTable[tmp.Rows.Count];
                for (int i = 0; i < tmp.Rows.Count; i++)
                {
                    dtProcedure[i]           = DataLayer.GetDataTableParameter(DataLayer.DatatableStyle.Parameter);
                    dtProcedure[i].TableName = "PKG_DAAAI09.PR_20";

                    string FacilityCode = tmp.Rows[i]["FACILITY_CODE"].ToString().Trim();
                    string FaciPart     = tmp.Rows[i]["FACI_PART"].ToString().Trim();
                    string RoomNo       = tmp.Rows[i]["ROOM_NO"].ToString().Trim();
                    string CleanStat    = tmp.Rows[i]["CLEAN_STAT"].ToString().Trim();

                    dtProcedure[i].Rows.Add(new object[] { "V_BIZ_CODE", Parm.CurrentUserInformation.BizInfo.BizCode });
                    dtProcedure[i].Rows.Add(new object[] { "V_FACILITY_CODE", FacilityCode });
                    dtProcedure[i].Rows.Add(new object[] { "V_FACI_PART", FaciPart });
                    dtProcedure[i].Rows.Add(new object[] { "V_ROOM_NO", RoomNo });
                    dtProcedure[i].Rows.Add(new object[] { "V_CLEAN_STAT", CleanStat });
                    dtProcedure[i].Rows.Add(new object[] { "V_U_EMP_NO", Parm.CurrentUserInformation.id });
                    dtProcedure[i].Rows.Add(new object[] { "V_U_IP", Parm.CurrentUserInformation.ip });
                }

                DataSet ds = DataLayer.AddProdedcure(dtProcedure);

                string g = DataLayer.ExecuteSpScalaTransaction(ds, "OK", DataLayer.MessageEncoding.Default);
                if (g != "OK")
                {
                    Basic.ShowMessage(3, g);
                    return;
                }

                fnSelect(false);
                Basic.ShowMessage(1, "저장하였습니다.");
            }
            catch (Exception ex)
            {
                Basic.ShowMessage(3, ex.Message);
            }
        }
예제 #10
0
        /// <summary>
        ///  수정버튼을 눌렀을 경우
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        private void btnUpdate_Click(object sender, EventArgs e)
        {
            try
            {
                DataTable dt = dtHoliday.GetChanges();

                if (dt == null || dt.Rows.Count <= 0)
                {
                    Basic.ShowMessage(1, "변경된 데이터가 없습니다.");
                    return;
                }


                Basic.SetCursor(this, false);
                Basic.LoadParentFunction(this, "저장 중 입니다.", true);

                DataTable[] dtExecute = new  DataTable[dt.Rows.Count];
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    string day  = dt.Rows[i]["CALN_DATE"].ToString().Trim().Replace("-", "");
                    string holi = dt.Rows[i]["HOLIDAY_NAME"].ToString().Trim();

                    dtExecute[i]           = DataLayer.GetDataTableParameter(DataLayer.DatatableStyle.Parameter);
                    dtExecute[i].TableName = "PKG_ZABI06.PR_04";
                    dtExecute[i].Rows.Add(new object[] { "V_BIZ_CODE", Parm.CurrentUserInformation.BizInfo.BizCode });
                    dtExecute[i].Rows.Add(new object[] { "V_CALN_DATE", day });
                    dtExecute[i].Rows.Add(new object[] { "V_HOLIDAY_NAME", holi });
                    dtExecute[i].Rows.Add(new object[] { "V_EMP_NO", BizCommon.Parm.CurrentUserInformation.id });
                    dtExecute[i].Rows.Add(new object[] { "V_IP", BizCommon.Parm.CurrentUserInformation.ip });
                }

                DataSet dsInsert = DataLayer.AddProdedcure(dtExecute);
                string  g        = DataLayer.ExecuteSpScalaTransaction(dsInsert, "OK", DataLayer.MessageEncoding.Default);
                if (g != "OK")
                {
                    Basic.ShowMessage(3, g);
                    return;
                }

                Selects();

                Basic.ShowMessage(1, "저장하였습니다.");
            }
            catch (Exception ex)
            {
                Basic.ShowMessage(3, ex.Message);
            }
            finally
            {
                Basic.SetCursor(this, true);
                Basic.LoadParentFunction(this, "", false);
            }
        }
예제 #11
0
        /// <summary>
        /// 저장버튼을 눌렀을 경우
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        private void ButtonSave_Click(object sender, EventArgs e)
        {
            try
            {
                if (this.gridResUser.DataSource == null)
                {
                    return;
                }

                DataTable tmp = ((DataTable)this.gridResUser.DataSource).GetChanges();



                if (tmp == null || tmp.Rows.Count <= 0)
                {
                    Basic.ShowMessage(1, "변경된 데이터가 없습니다.");
                    return;
                }

                DataTable[] dtProcedure = new  DataTable[tmp.Rows.Count];
                for (int i = 0; i < tmp.Rows.Count; i++)
                {
                    dtProcedure[i]           = DataLayer.GetDataTableParameter(DataLayer.DatatableStyle.Parameter);
                    dtProcedure[i].TableName = "PKG_DAAAI01.PR_03";

                    string emp_no    = tmp.Rows[i]["RES_EMP_NO"].ToString().Trim();
                    string factory   = tmp.Rows[i]["RES_FACILITY_CODE"].ToString().Trim();
                    string admincode = tmp.Rows[i]["RES_RSV_LIMIT"].ToString().Trim();

                    dtProcedure[i].Rows.Add(new object[] { "V_BIZ_CODE", Parm.CurrentUserInformation.BizInfo.BizCode });
                    dtProcedure[i].Rows.Add(new object[] { "V_EMP_NO", emp_no });
                    dtProcedure[i].Rows.Add(new object[] { "V_FACILITY_CODE", factory });
                    dtProcedure[i].Rows.Add(new object[] { "V_ADMIN_CODE", admincode });
                }

                DataSet ds = DataLayer.AddProdedcure(dtProcedure);

                string g = DataLayer.ExecuteSpScalaTransaction(ds, "OK", DataLayer.MessageEncoding.Default);
                if (g != "OK")
                {
                    Basic.ShowMessage(3, g);
                    return;
                }

                InvokeOnClick(btnSelect, new EventArgs());
                Basic.ShowMessage(1, "저장하였습니다.");
            }
            catch (Exception ex)
            {
                Basic.ShowMessage(3, ex.Message);
            }
        }
예제 #12
0
        /// <summary>
        /// 출력순서 일괄변경
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        private void btnDisplaySEQ_Update_Click(object sender, EventArgs e)
        {
            try
            {
                //LEVEL_SORT3
                if (dtProject.Rows.Count <= 0)
                {
                    Basic.ShowMessage(1, "변경된 데이터가 없습니다.");
                    return;
                }

                DataRow[] r = dtProject.Select("isnull(LEVEL_SORT3, -99)  <> isnull(LEVEL_SORT3_ORG , -99)");

                if (r == null || r.Length <= 0)
                {
                    Basic.ShowMessage(1, "변경된 데이터가 없습니다.");
                    return;
                }

                DataTable[] dtParm  = new DataTable[r.Length];
                string      project = CboBox.ComboSelectedMember(this.comboBoxProject, Parm._VALUE_MEMBER);
                for (int i = 0; i < r.Length; i++)
                {
                    dtParm[i]           = DataLayer.GetDataTableParameter(DataLayer.DatatableStyle.Parameter);
                    dtParm[i].TableName = "PKG_ZABI02.PR_08";
                    dtParm[i].Rows.Add(new object[] { "V_PROJECT_ID", project });
                    dtParm[i].Rows.Add(new object[] { "V_MENU_ID", r[i]["LEVEL_CODE2"].ToString().Trim() });
                    dtParm[i].Rows.Add(new object[] { "V_PROGRAM_ID", r[i]["LEVEL_CODE3"].ToString().Trim() });
                    dtParm[i].Rows.Add(new object[] { "V_DISPLAY_SEQ", r[i]["LEVEL_SORT3"].ToString().Trim() });
                    dtParm[i].Rows.Add(new object[] { "V_U_EMP_NO", Parm.CurrentUserInformation.id });
                    dtParm[i].Rows.Add(new object[] { "V_U_IP", Parm.CurrentUserInformation.ip });
                }

                DataSet dsTmp = DataLayer.AddProdedcure(dtParm);

                string g = DataLayer.ExecuteSpScalaTransaction(dsTmp, "OK", DataLayer.MessageEncoding.Default);
                if (g != "OK")
                {
                    Basic.ShowMessage(3, g);
                    return;
                }
                SettingMenu(CboBox.ComboSelectedMember(this.comboBoxProject, Parm._VALUE_MEMBER));
                Basic.ShowMessage(1, "변경 하였습니다.");
            }
            catch (Exception ex)
            {
                Basic.ShowMessage(3, ex.Message);
            }
        }
예제 #13
0
        /// <summary>
        /// 예약권한삭제
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        private void picDelete_Click(object sender, EventArgs e)
        {
            try
            {
                this.picDelete.Focus();


                DataRow[] r = ((DataTable)this.gridResUser.DataSource).Select("RES_CHK = 'Y'");


                if (r.Length <= 0)
                {
                    Basic.ShowMessage(1, "선택된 데이터가 없습니다.");
                    return;
                }

                DataTable[] dtProcedure = new DataTable[r.Length];
                for (int i = 0; i < r.Length; i++)
                {
                    string emp_no  = r[i]["RES_EMP_NO"].ToString().Trim();
                    string factory = r[i]["RES_FACILITY_CODE"].ToString().Trim();

                    dtProcedure[i]           = DataLayer.GetDataTableParameter(DataLayer.DatatableStyle.Parameter);
                    dtProcedure[i].TableName = "PKG_DAAAI01.PR_04";
                    dtProcedure[i].Rows.Add(new object[] { "V_BIZ_CODE", Parm.CurrentUserInformation.BizInfo.BizCode });
                    dtProcedure[i].Rows.Add(new object[] { "V_EMP_NO", emp_no });
                    dtProcedure[i].Rows.Add(new object[] { "V_FACILITY_CODE", factory });
                }



                DataSet ds = DataLayer.AddProdedcure(dtProcedure);
                string  g  = DataLayer.ExecuteSpScalaTransaction(ds, "OK", DataLayer.MessageEncoding.Default);

                if (g != "OK")
                {
                    Basic.ShowMessage(3, g);
                    return;
                }

                InvokeOnClick(btnSelect, new EventArgs());
                Basic.ShowMessage(1, "삭제 하였습니다..");
            }
            catch (Exception ex)
            {
                ((DataTable)this.gridResUser.DataSource).RejectChanges();
                Basic.ShowMessage(3, ex.Message);
            }
        }
예제 #14
0
        /// <summary>
        /// 예약권한 등록
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        private void picInsert_Click(object sender, EventArgs e)
        {
            try
            {
                picInsert.Focus();

                DataRow[] r = ((DataTable)this.gridUser.DataSource).Select("CHK = 'Y'");

                if (r.Length <= 0)
                {
                    Basic.ShowMessage(1, "선택된 데이터가 없습니다.");
                    return;
                }

                DataTable[] dtProcedure = new DataTable[r.Length];
                for (int i = 0; i < r.Length; i++)
                {
                    dtProcedure[i]           = DataLayer.GetDataTableParameter(DataLayer.DatatableStyle.Parameter);
                    dtProcedure[i].TableName = "PKG_CAAAI01.PR_02";

                    string empno    = r[i]["EMP_NO"].ToString().Trim();
                    string rsvlimit = r[i]["RSV_LIMIT"].ToString().Trim();
                    rsvlimit = rsvlimit == "" ? "X" : rsvlimit;

                    dtProcedure[i].Rows.Add(new object[] { "V_EMP_NO", empno });
                    dtProcedure[i].Rows.Add(new object[] { "V_RSV_LIMIT", rsvlimit });
                    dtProcedure[i].Rows.Add(new object[] { "V_U_EMP_NO", BizCommon.Parm.CurrentUserInformation.id });
                    dtProcedure[i].Rows.Add(new object[] { "V_U_IP", BizCommon.Parm.CurrentUserInformation.ip });
                }



                DataSet ds = DataLayer.AddProdedcure(dtProcedure);
                string  g  = DataLayer.ExecuteSpScalaTransaction(ds, "OK", DataLayer.MessageEncoding.Default);

                if (g != "OK")
                {
                    Basic.ShowMessage(3, g);
                    return;
                }

                InvokeOnClick(btnSelect, new EventArgs());
            }
            catch (Exception ex)
            {
                ((DataTable)this.gridUser.DataSource).RejectChanges();
                Basic.ShowMessage(3, ex.Message);
            }
        }
예제 #15
0
        /// <summary>
        /// 우대구분 저장
        /// </summary>
        private void SaveGuestType()
        {
            if (!grvRewardStandard.IsDataRow(grvRewardStandard.FocusedRowHandle))
            {
                Basic.ShowMessage(1, "적립기준을 선택 하신 후 우대구분을 저장해 주세요.");
            }
            else
            {
                DataTable dtChanges = dtGuestType.GetChanges();
                if (dtChanges != null && dtChanges.Rows.Count > 0)
                {
                    List <DataTable> dtProcedures = new List <DataTable>();
                    foreach (DataRow drChange in dtChanges.Rows)
                    {
                        if (drChange.RowState == DataRowState.Modified)
                        {
                            DataTable dtProcedure = DataLayer.GetDataTableParameter(DataLayer.DatatableStyle.Parameter);
                            dtProcedure.TableName = drChange["IS_SELECTED_ROW"]?.ToString() == "Y" ? "PKG_ALAAI11.PR_20" : "PKG_ALAAI11.PR_22";
                            dtProcedure.Rows.Add(new object[] { "V_BIZ_CODE", Parm.CurrentUserInformation.BizInfo.BizCode });
                            dtProcedure.Rows.Add(new object[] { "V_REWARD_STND_SEQ", drChange["REWARD_STND_SEQ"] });
                            dtProcedure.Rows.Add(new object[] { "V_GUEST_TYPE", drChange["GUEST_TYPE"] });
                            if (dtProcedure.TableName == "PKG_ALAAI11.PR_20")
                            {
                                dtProcedure.Rows.Add(new object[] { "V_EMP_NO", Parm.CurrentUserInformation.id });
                                dtProcedure.Rows.Add(new object[] { "V_IP", Parm.CurrentUserInformation.ip });
                            }
                            dtProcedures.Add(dtProcedure);
                        }
                    }

                    DataSet dsProcedure = DataLayer.AddProdedcure(dtProcedures.ToArray());
                    string  result      = DataLayer.ExecuteSpScalaTransaction(dsProcedure, "OK", DataLayer.MessageEncoding.Default);
                    if (result == "OK")
                    {
                        SearchDetail(); // TODO: 제외회원 조회만 처리 (디테일 모두 조회가 아닌)
                        Basic.ShowMessage(1, "우대구분을 저장하였습니다.");
                    }
                    else
                    {
                        Basic.ShowMessage(3, result);
                    }
                }
                else
                {
                    Basic.ShowMessage(1, "변경한 내역이 없습니다.");
                }
            }
        }
예제 #16
0
        /// <summary>
        /// 예약권한삭제
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        private void picDelete_Click(object sender, EventArgs e)
        {
            try
            {
                this.picDelete.Focus();


                DataRow[] r = ((DataTable)this.gridResFacility.DataSource).Select("CHK = 'Y'");


                if (r.Length <= 0)
                {
                    Basic.ShowMessage(1, "선택된 데이터가 없습니다.");
                    return;
                }

                DataTable[] dtProcedure = new DataTable[r.Length];
                for (int i = 0; i < r.Length; i++)
                {
                    string paycode = r[i]["PAY_CODE"].ToString().Trim();
                    string factory = this.gridViewFactory.GetRowCellValue(this.gridViewFactory.FocusedRowHandle, "FACILITY_CODE").ToString().Trim();
                    dtProcedure[i]           = DataLayer.GetDataTableParameter(DataLayer.DatatableStyle.Parameter);
                    dtProcedure[i].TableName = "PKG_JAAAI02.PR_04";
                    dtProcedure[i].Rows.Add(new object[] { "V_BIZ_CODE", Parm.CurrentUserInformation.BizInfo.BizCode });
                    dtProcedure[i].Rows.Add(new object[] { "V_FACILITY_CODE", factory });
                    dtProcedure[i].Rows.Add(new object[] { "V_PAY_CODE", paycode });
                }

                DataSet ds = DataLayer.AddProdedcure(dtProcedure);
                string  g  = DataLayer.ExecuteSpScalaTransaction(ds, "OK", DataLayer.MessageEncoding.Default);

                if (g != "OK")
                {
                    Basic.ShowMessage(3, g);
                    return;
                }

                Selects();
                Basic.ShowMessage(1, "삭제 하였습니다..");
            }
            catch (Exception ex)
            {
                ((DataTable)this.gridResFacility.DataSource).RejectChanges();
                Basic.ShowMessage(3, ex.Message);
            }
        }
예제 #17
0
        /// <summary>
        /// 권한삭제시
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        private void picDelete_Click(object sender, EventArgs e)
        {
            try
            {
                this.picDelete.Focus();

                DataRow[] rResult = dtResult.Select("CHK = 'Y'");
                if (rResult.Length <= 0)
                {
                    Basic.ShowMessage(1, "선택된 데이터가 없습니다.");
                    return;
                }

                DataTable[] dtParm = new  DataTable[rResult.Length];

                for (int j = 0; j < rResult.Length; j++)
                {
                    dtParm[j]           = DataLayer.GetDataTableParameter(DataLayer.DatatableStyle.Parameter);
                    dtParm[j].TableName = "PKG_ZABI11.PR_03";
                    dtParm[j].Rows.Add(new object[] { "V_BIZ_CODE", rResult[j]["BIZ_CODE"].ToString().Trim() });
                    dtParm[j].Rows.Add(new object[] { "V_EMP_NO", rResult[j]["EMP_NO"].ToString().Trim() });
                    dtParm[j].Rows.Add(new object[] { "V_JOB", "DELETE" });
                    dtParm[j].Rows.Add(new object[] { "V_U_EMP_NO", Parm.CurrentUserInformation.id });
                    dtParm[j].Rows.Add(new object[] { "V_U_IP", Parm.CurrentUserInformation.ip });
                }

                DataSet dsParm = DataLayer.AddProdedcure(dtParm);
                string  ret    = DataLayer.ExecuteSpScalaTransaction(dsParm, "OK", DataLayer.MessageEncoding.Default);

                if (ret != "OK")
                {
                    Basic.ShowMessage(3, ret);
                    return;
                }


                fnSelect();
                Basic.ShowMessage(1, "삭제 하였습니다.");
            }
            catch (Exception ex)
            {
                Basic.ShowMessage(3, ex.Message);
            }
        }
예제 #18
0
        /// <summary>
        /// 분류를 입력합니다.
        /// </summary>
        private void Inserts(DataRow[] r)
        {
            try
            {
                string facilitycode = this.gridViewKind.GetRowCellValue(this.gridViewKind.FocusedRowHandle, "FACILITY_CODE").ToString().Trim();
                string menugroupno  = this.gridViewKind.GetRowCellValue(this.gridViewKind.FocusedRowHandle, "MENU_GROUP_NO").ToString().Trim();

                DataTable[] dtProcedure = new DataTable[r.Length];

                for (int i = 0; i < r.Length; i++)
                {
                    string menucode   = r[i]["MENU_CODE"].ToString().Trim();
                    string displayseq = r[i]["DISPLAY_SEQ"].ToString().Trim();

                    dtProcedure[i]           = DataLayer.GetDataTableParameter(DataLayer.DatatableStyle.Parameter);
                    dtProcedure[i].TableName = "PKG_JAAAi13.PR_03";
                    dtProcedure[i].Rows.Add(new object[] { "V_BIZ_CODE", Parm.CurrentUserInformation.BizInfo.BizCode });
                    dtProcedure[i].Rows.Add(new object[] { "V_FACILITY_CODE", facilitycode });
                    dtProcedure[i].Rows.Add(new object[] { "V_MENU_GROUP_NO", menugroupno });
                    dtProcedure[i].Rows.Add(new object[] { "V_MENU_CODE", menucode });
                    dtProcedure[i].Rows.Add(new object[] { "V_DISPLAY_SEQ", displayseq });
                    dtProcedure[i].Rows.Add(new object[] { "V_U_EMP_NO", BizCommon.Parm.CurrentUserInformation.id });
                    dtProcedure[i].Rows.Add(new object[] { "V_U_IP", BizCommon.Parm.CurrentUserInformation.ip });
                }

                DataSet ds = DataLayer.AddProdedcure(dtProcedure);
                string  g  = DataLayer.ExecuteSpScalaTransaction(ds, "OK", DataLayer.MessageEncoding.Default);

                if (g != "OK")
                {
                    Basic.ShowMessage(3, g);
                    return;
                }

                dtMenu.RejectChanges();
                dtMenu.AcceptChanges();
                fnSelect(facilitycode, menugroupno, true);
                Basic.ShowMessage(1, "입력하였습니다.");
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
예제 #19
0
        /// <summary>
        /// 회원 추가
        /// </summary>
        private void AddMember()
        {
            if (!grvRewardStandard.IsDataRow(grvRewardStandard.FocusedRowHandle))
            {
                Basic.ShowMessage(1, "적립기준을 선택 하신 후 제외회원을 추가해 주세요.");
            }
            else if (grvMember.SelectedRowsCount <= 0)
            {
                Basic.ShowMessage(1, "선택한 회원이 없습니다.");
            }
            else
            {
                List <DataTable> dtProcedures = new List <DataTable>();

                int[] selectedRows = grvMember.GetSelectedRows();
                foreach (int rowHandle in selectedRows)
                {
                    DataRow dataRow = grvMember.GetDataRow(rowHandle);

                    // 프로시저 호출에 사용할 매개변수 세팅
                    DataTable dtProcedure = DataLayer.GetDataTableParameter(DataLayer.DatatableStyle.Parameter);
                    dtProcedure.TableName = "PKG_ALAAI11.PR_30";
                    dtProcedure.Rows.Add(new object[] { "V_BIZ_CODE", Parm.CurrentUserInformation.BizInfo.BizCode });
                    dtProcedure.Rows.Add(new object[] { "V_REWARD_STND_SEQ", dataRow["REWARD_STND_SEQ"] });
                    dtProcedure.Rows.Add(new object[] { "V_CUST_NO", dataRow["CUST_NO"] });
                    dtProcedure.Rows.Add(new object[] { "V_EMP_NO", Parm.CurrentUserInformation.id });
                    dtProcedure.Rows.Add(new object[] { "V_IP", Parm.CurrentUserInformation.ip });
                    dtProcedures.Add(dtProcedure);
                }

                DataSet dsProcedure = DataLayer.AddProdedcure(dtProcedures.ToArray());
                string  result      = DataLayer.ExecuteSpScalaTransaction(dsProcedure, "OK", DataLayer.MessageEncoding.Default);
                if (result == "OK")
                {
                    SearchDetail(); // TODO: 제외회원 조회만 처리 (디테일 모두 조회가 아닌)
                    Basic.ShowMessage(1, "제외회원을 추가하였습니다.");
                }
                else
                {
                    Basic.ShowMessage(3, result);
                }
            }
        }
예제 #20
0
        /// <summary>
        /// 삭제
        /// </summary>
        /// <param name="r">삭제할 Row.</param>
        private void fnDelete(DataRow[] r)
        {
            try
            {
                DataTable[] dtProcedure = new DataTable[r.Length];

                string faicilitycode = r[0]["FACILITY_CODE"].ToString().Trim();
                string menugroupno   = r[0]["MENU_GROUP_NO"].ToString().Trim();

                for (int i = 0; i < r.Length; i++)
                {
                    string menucode = r[i]["MENU_CODE"].ToString().Trim();

                    dtProcedure[i]           = DataLayer.GetDataTableParameter(DataLayer.DatatableStyle.Parameter);
                    dtProcedure[i].TableName = "PKG_JAAAi13.PR_05";
                    dtProcedure[i].Rows.Add(new object[] { "V_BIZ_CODE", Parm.CurrentUserInformation.BizInfo.BizCode });
                    dtProcedure[i].Rows.Add(new object[] { "V_FACILITY_CODE", faicilitycode });
                    dtProcedure[i].Rows.Add(new object[] { "V_MENU_GROUP_NO", menugroupno });
                    dtProcedure[i].Rows.Add(new object[] { "V_MENU_CODE", menucode });
                }

                DataSet ds = DataLayer.AddProdedcure(dtProcedure);
                string  g  = DataLayer.ExecuteSpScalaTransaction(ds, "OK", DataLayer.MessageEncoding.Default);

                if (g != "OK")
                {
                    Basic.ShowMessage(3, g);
                    return;
                }
                dtMenu.RejectChanges();
                dtMenu.AcceptChanges();
                fnSelect(faicilitycode, menugroupno, true);
                Basic.ShowMessage(1, "삭제 하였습니다..");
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
예제 #21
0
        /// <summary>
        /// 수정함수
        /// </summary>
        private void Updates()
        {
            try
            {
                ///TDDO:[위약해지등록]수정

                //유효성 검사후 실행합니다.
                if (!ISCheckData(JobStyle.UPDATE))
                {
                    return;
                }

                Basic.SetCursor(this, false);
                Basic.LoadParentFunction(this, "저장 중 입니다..", true);

                string rsvno    = "";
                string cancelyn = "";
                string rmrk     = "";

                int       iRow  = gridViewCancel.GetDataSourceRowIndex(gridViewCancel.FocusedRowHandle);
                DataTable dtTmp = gridCancel.DataSource as DataTable;

                if (rdoSelect.EditValue.ToString().Trim() == "0")
                {
                    //수정함수를 구현합니다.
                    //만약 변수가 필요없다면 아래 코드를 삭제 하세요
                    DataTable dtparmUpdate = DataLayer.GetDataTableParameter(DataLayer.DatatableStyle.Parameter);

                    rsvno    = dtTmp.Rows[iRow]["RSV_NO"].ToString().Trim();
                    cancelyn = "Y";
                    rmrk     = mmoRmrk.Text.ToString().Trim();

                    dtparmUpdate.Rows.Add(new object[] { "V_RSV_NO", rsvno });
                    dtparmUpdate.Rows.Add(new object[] { "V_CANCEL_YN", cancelyn });
                    dtparmUpdate.Rows.Add(new object[] { "V_RMRK", rmrk });
                    dtparmUpdate.Rows.Add(new object[] { "V_EMP_NO", Parm.CurrentUserInformation.id });
                    dtparmUpdate.Rows.Add(new object[] { "V_IP", Parm.CurrentUserInformation.ip });

                    //프로시져를 호출하여 결과를 리턴 받는다.
                    //만약 output 값이 여러개라면 '|' (파이프) 값으로 구분하여 들어온다.
                    //Split 함수로 짤라서 사용한다.
                    string Result = DataLayer.ExecuteSpScala("PKG_CBAAI02.PR_10", dtparmUpdate, DataLayer.MessageEncoding.Default);

                    //프로시져 에러라면 빠져나간다.
                    if (Result.Trim() != "OK")
                    {
                        Basic.ShowMessage(3, Result);
                        return;
                    }
                }
                else
                {
                    DataTable t = gridCancel.DataSource as DataTable;
                    DataRow[] r = t.Select("CANCEL_YN = 'N'");
                    if (r.Length <= 0)
                    {
                        Basic.ShowMessage(2, "해지할 데이타가 없습니다");
                        return;
                    }

                    DataTable[] dtProcedure = new DataTable[r.Length];

                    cancelyn = "Y";
                    rmrk     = mmoRmrk.Text.ToString().Trim();

                    for (int j = 0; j < r.Length; j++)
                    {
                        rsvno = r[j]["RSV_NO"].ToString().Trim();

                        dtProcedure[j] = DataLayer.GetDataTableParameter(DataLayer.DatatableStyle.Parameter);
                        dtProcedure[j].Rows.Add(new object[] { "V_RSV_NO", rsvno });
                        dtProcedure[j].Rows.Add(new object[] { "V_CANCEL_YN", cancelyn });
                        dtProcedure[j].Rows.Add(new object[] { "V_RMRK", rmrk });
                        dtProcedure[j].Rows.Add(new object[] { "V_EMP_NO", Parm.CurrentUserInformation.id });
                        dtProcedure[j].Rows.Add(new object[] { "V_IP", Parm.CurrentUserInformation.ip });
                        dtProcedure[j].TableName = "PKG_CBAAI02.PR_10";
                    }

                    DataSet ds = DataLayer.AddProdedcure(dtProcedure);
                    string  gs = DataLayer.ExecuteSpScalaTransaction(ds, "OK", DataLayer.MessageEncoding.Default);

                    if (gs != "OK")
                    {
                        Basic.ShowMessage(3, gs);
                        dt_Cancel.RejectChanges();
                    }
                    //Commit
                    dt_Cancel.AcceptChanges();
                }

                //수정한 데이터를 조회 를 합니다...
                Selects(false);

                // 조회 가 끝난 후 입력한 데이터를 선택합니다.
                DevExpress.XtraGrid.Columns.GridColumn[] cols;
                object[] obj;
                cols = new GridColumn[] { this.gridViewCancel.Columns["RSV_NO"] };
                obj  = new object[] { rsvno };
                Cls.Grid.Options.SelectGridRow(this.gridViewCancel, cols, obj);

                Basic.ShowMessage(1, "저장 하였습니다.");
            }
            catch (Exception ex)
            {
                Basic.ShowMessage(3, ex.Message);
            }
            finally
            {
                Basic.SetCursor(this, true);
                Basic.LoadParentFunction(this, "", false);
            }
        }
예제 #22
0
        private void fnDeleteReceGrp()
        {
            try
            {
                //유효성 검사후 실행합니다..
                //if (!ISCheckData(JobStyle.UPDATE)) return;

                Basic.SetCursor(this, false);
                Basic.LoadParentFunction(this, "그룹에서 모든 맴버를 삭제 중 입니다...", true);

                DataTable dtTmp = Basic.GetdtSelect(dtReceGrp, "CHK = 'Y'", "");

                if (dtTmp == null || dtTmp.Rows.Count <= 0)
                {
                    Basic.ShowMessage(1, "선택된 그룹이 없습니다.");
                    return;
                }

                // 미수 그룹이 정산이 완료된 상태라면 미수 그룹을 제거할 수 없다.
                DataTable dtTmpCalcYN = Basic.GetdtSelect(dtTmp, "EXAT_CALC_YN = 'Y'", "");

                if (dtTmpCalcYN.Rows.Count > 0)
                {
                    Basic.ShowMessage(1, "이미 정산이 완료된 미수 그룹이 있습니다.");
                    return;
                }


                // 입금내역이 존재한다면 그룹을 삭제할 수가 없다.
                DataTable dtTmpAmtNoZero = Basic.GetdtSelect(dtTmp, "REDEEM_CNT <> 0", "");

                if (dtTmpAmtNoZero.Rows.Count > 0)
                {
                    Basic.ShowMessage(1, "선택된 그룹 중 이미 입금내역이 있는 그룹이 있습니다.");
                    return;
                }

                DataTable[] dtProcedure = new DataTable[dtTmp.Rows.Count];

                for (int i = 0; i < dtTmp.Rows.Count; i++)
                {
                    dtProcedure[i]           = DataLayer.GetDataTableParameter(DataLayer.DatatableStyle.Parameter);
                    dtProcedure[i].TableName = "PKG_JFAAI00.PR_12";

                    dtProcedure[i].Rows.Add(new object[] { "V_BIZ_CODE", Parm.CurrentUserInformation.BizInfo.BizCode });
                    dtProcedure[i].Rows.Add(new object[] { "V_ANNUAL", dtTmp.Rows[i]["ANNUAL"] });
                    dtProcedure[i].Rows.Add(new object[] { "V_CAP_MEMBER_SEQ", dtTmp.Rows[i]["CAP_MEMBER_SEQ"] });
                    dtProcedure[i].Rows.Add(new object[] { "V_GROUP_SEQ", dtTmp.Rows[i]["GROUP_SEQ"] });

                    //입력정보
                    dtProcedure[i].Rows.Add(new object[] { "V_U_EMP_NO", Parm.CurrentUserInformation.id });
                    dtProcedure[i].Rows.Add(new object[] { "V_U_IP", Parm.CurrentUserInformation.ip });
                }

                DataSet ds     = DataLayer.AddProdedcure(dtProcedure);
                string  Result = DataLayer.ExecuteSpScalaTransaction(ds, "OK", DataLayer.MessageEncoding.Default);

                //프로시져 에러라면 빠져나간다.
                if (Result != "OK")
                {
                    Basic.ShowMessage(3, Result);
                    return;
                }

                fnSelectReceGrp();
                fnSelectMember();
                fnSelectRece();

                Basic.ShowMessage(1, "삭제 하였습니다.");
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                Basic.SetCursor(this, true);
                Basic.LoadParentFunction(this, "", false);
            }
        }
예제 #23
0
        private void fnInsertReceGrpAll()
        {
            try
            {
                //유효성 검사후 실행합니다..
                //if (!ISCheckData(JobStyle.UPDATE)) return;

                Basic.SetCursor(this, false);
                Basic.LoadParentFunction(this, "선택된 미수금을 개별 그룹으로 생성 중 입니다...", true);

                DataTable dtTmpRece = Basic.GetdtSelect(dtRece, "CHK = 'Y'", "");;


                if (dtTmpRece == null || dtTmpRece.Rows.Count <= 0)
                {
                    Basic.ShowMessage(1, "선택된 미수금이 없습니다.");
                    return;
                }

                DataTable[] dtProcedure = new DataTable[dtTmpRece.Rows.Count];

                for (int i = 0; i < dtTmpRece.Rows.Count; i++)
                {
                    //if (dtTmpRece.Rows[i]["CHK"].ToString() == "Y")
                    //{
                    dtProcedure[i]           = DataLayer.GetDataTableParameter(DataLayer.DatatableStyle.Parameter);
                    dtProcedure[i].TableName = "PKG_JFAAI00.PR_13";

                    string rmrk   = "";
                    string receno = dtTmpRece.Rows[i]["RECE_NO"].ToString().Trim();

                    DataTable dtParm = DataLayer.GetDataTableParameter(DataLayer.DatatableStyle.Parameter);
                    dtProcedure[i].Rows.Add(new object[] { "V_BIZ_CODE", Parm.CurrentUserInformation.BizInfo.BizCode });
                    dtProcedure[i].Rows.Add(new object[] { "V_ANNUAL", dtTmpRece.Rows[i]["ANNUAL"].ToString().Trim() });
                    dtProcedure[i].Rows.Add(new object[] { "V_MEMBER_SEQ", dtTmpRece.Rows[i]["MEMBER_SEQ"].ToString().Trim() });
                    dtProcedure[i].Rows.Add(new object[] { "V_RMRK", rmrk });
                    dtProcedure[i].Rows.Add(new object[] { "V_RECE_NO", receno });

                    //입력정보
                    dtProcedure[i].Rows.Add(new object[] { "V_U_EMP_NO", Parm.CurrentUserInformation.id });
                    dtProcedure[i].Rows.Add(new object[] { "V_U_IP", Parm.CurrentUserInformation.ip });
                    //}
                }

                DataSet ds     = DataLayer.AddProdedcure(dtProcedure);
                string  Result = DataLayer.ExecuteSpScalaTransaction(ds, "OK", DataLayer.MessageEncoding.Default);

                //프로시져 에러라면 빠져나간다.
                if (Result != "OK")
                {
                    Basic.ShowMessage(3, Result);
                    return;
                }

                fnSelectRece();
                fnSelectReceGrp();
                fnSelectMember();
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                Basic.SetCursor(this, true);
                Basic.LoadParentFunction(this, "", false);
            }
        }
예제 #24
0
        private void fnMember()
        {
            ///TDDO:
            try
            {
                int iRow = gridViewReceGrp.GetDataSourceRowIndex(gridViewReceGrp.FocusedRowHandle);

                //유효성 검사후 실행합니다..
                //if (!ISCheckData(JobStyle.UPDATE)) return;

                Basic.SetCursor(this, false);
                Basic.LoadParentFunction(this, "미수금 그룹에 맴버를 등록 중 입니다...", true);

                DataTable dtTmpRece    = gridRece.DataSource as DataTable;
                DataTable dtTmpReceGrp = gridReceGrp.DataSource as DataTable;

                dtTmpRece = Basic.GetdtSelect(dtTmpRece, "CHK = 'Y'", "");

                if (dtTmpRece == null || dtTmpRece.Rows.Count <= 0)
                {
                    Basic.ShowMessage(1, "선택된 미수금이 없습니다.");
                    return;
                }

                if (iRow < 0)
                {
                    Basic.ShowMessage(1, "선택된 미수금 그룹이 없습니다.");
                    return;
                }

                // 맴버의 미수 그룹이 정산이 완료된 상태라면 맴버를 추가할 수 없다.
                if (dtReceGrp.Rows[iRow]["EXAT_CALC_YN"].ToString().Trim() == "Y")
                {
                    Basic.ShowMessage(1, "맴버를 추가하려는 그룹이 이미 정산이 완료된 미수 그룹입니다.");
                    return;
                }

                DataTable[] dtProcedure = new DataTable[dtTmpRece.Rows.Count];

                for (int i = 0; i < dtTmpRece.Rows.Count; i++)
                {
                    if (dtTmpRece.Rows[i]["CHK"].ToString() == "Y")
                    {
                        dtProcedure[i]           = DataLayer.GetDataTableParameter(DataLayer.DatatableStyle.Parameter);
                        dtProcedure[i].TableName = "PKG_JFAAI00.PR_20";

                        string strReceNo = dtTmpRece.Rows[i]["RECE_NO"].ToString().Trim();

                        DataTable dtParm = DataLayer.GetDataTableParameter(DataLayer.DatatableStyle.Parameter);
                        dtProcedure[i].Rows.Add(new object[] { "V_RECR_NO", strReceNo });
                        dtProcedure[i].Rows.Add(new object[] { "V_BIZ_CODE", Parm.CurrentUserInformation.BizInfo.BizCode });
                        dtProcedure[i].Rows.Add(new object[] { "V_CAP_MEMBER_SEQ", dtTmpReceGrp.Rows[iRow]["CAP_MEMBER_SEQ"] });
                        dtProcedure[i].Rows.Add(new object[] { "V_GROUP_SEQ", dtTmpReceGrp.Rows[iRow]["GROUP_SEQ"] });

                        //입력정보
                        dtProcedure[i].Rows.Add(new object[] { "V_U_EMP_NO", Parm.CurrentUserInformation.id });
                        dtProcedure[i].Rows.Add(new object[] { "V_U_IP", Parm.CurrentUserInformation.ip });
                    }
                }

                DataSet ds     = DataLayer.AddProdedcure(dtProcedure);
                string  Result = DataLayer.ExecuteSpScalaTransaction(ds, "OK", DataLayer.MessageEncoding.Default);

                //프로시져 에러라면 빠져나간다.
                if (Result != "OK")
                {
                    Basic.ShowMessage(3, Result);
                    return;
                }

                fnSelectRece();
                fnSelectMember();
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                Basic.SetCursor(this, true);
                Basic.LoadParentFunction(this, "", false);
            }
        }
예제 #25
0
        private void fnDeleteReceGrpMem()
        {
            try
            {
                //유효성 검사후 실행합니다..
                //if (!ISCheckData(JobStyle.UPDATE)) return;

                Basic.SetCursor(this, false);
                Basic.LoadParentFunction(this, "그룹에서 맴버를 삭제 중 입니다...", true);

                DataTable dtTmp = Basic.GetdtSelect(dtReceGrpMem, "CHK = 'Y'", "");

                if (dtTmp == null || dtTmp.Rows.Count <= 0)
                {
                    Basic.ShowMessage(1, "선택된 맴버가 없습니다.");
                    return;
                }


                int iRow = gridViewReceGrp.GetDataSourceRowIndex(gridViewReceGrp.FocusedRowHandle);

                // 맴버의 미수 그룹이 정산이 완료된 상태라면 맴버를 제거할 수 없다.
                if (dtReceGrp.Rows[iRow]["EXAT_CALC_YN"].ToString().Trim() == "Y")
                {
                    Basic.ShowMessage(1, "이미 정산이 완료된 미수 그룹의 맴버입니다.");
                    return;
                }

                // 그룹에서 맴버를 제거 시 그룹 내 총 미수금액이 입금된 금액보다 작아지면 맴버를 제거할 수 없다.
                double dubAmt         = double.Parse(dtReceGrp.Rows[iRow]["AMT"].ToString().Trim());
                double dubOrigineAmt  = double.Parse(dtReceGrpMem.Compute("Sum(RECE_AMT)", "").ToString().Trim());
                double dubRemovingAmt = double.Parse(dtTmp.Compute("Sum(RECE_AMT)", "").ToString().Trim());

                if (dubOrigineAmt - dubRemovingAmt < dubAmt)
                {
                    Basic.ShowMessage(1, "그룹 내 총 미수금액이 입금된 금액 보다 작아집니다.");
                    return;
                }


                DataTable[] dtProcedure = new DataTable[dtTmp.Rows.Count];

                for (int i = 0; i < dtTmp.Rows.Count; i++)
                {
                    dtProcedure[i]           = DataLayer.GetDataTableParameter(DataLayer.DatatableStyle.Parameter);
                    dtProcedure[i].TableName = "PKG_JFAAI00.PR_23";

                    string strReceNo = dtTmp.Rows[i]["RECE_NO"].ToString().Trim();

                    //DataTable dtParm = DataLayer.GetDataTableParameter(DataLayer.DatatableStyle.Parameter);
                    dtProcedure[i].Rows.Add(new object[] { "V_RECR_NO", strReceNo });
                    dtProcedure[i].Rows.Add(new object[] { "V_BIZ_CODE", Parm.CurrentUserInformation.BizInfo.BizCode });

                    //입력정보
                    dtProcedure[i].Rows.Add(new object[] { "V_U_EMP_NO", Parm.CurrentUserInformation.id });
                    dtProcedure[i].Rows.Add(new object[] { "V_U_IP", Parm.CurrentUserInformation.ip });
                }

                DataSet ds     = DataLayer.AddProdedcure(dtProcedure);
                string  Result = DataLayer.ExecuteSpScalaTransaction(ds, "OK", DataLayer.MessageEncoding.Default);

                //프로시져 에러라면 빠져나간다.
                if (Result != "OK")
                {
                    Basic.ShowMessage(3, Result);
                    return;
                }

                fnSelectRece();
                fnSelectMember();
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                Basic.SetCursor(this, true);
                Basic.LoadParentFunction(this, "", false);
            }
        }
예제 #26
0
        /// <summary>
        /// 객실료발생
        /// </summary>
        private void Inserts()
        {
            try
            {
                ///TDDO:[템플릿]입력
                //유효성검사 후 사용
                if (!ISCheckData(JobStyle.INSERT))
                {
                    return;
                }
                //에니메이션 과 커서의 모양을 바궈준다.
                Basic.SetCursor(this, false);
                Basic.LoadParentFunction(this, "입력 중 입니다..", true);

                //if (dt.Rows.Count <= 0) return; // 조회여부


                // 마감작업 시작 가능여부 체크
                if (!CheckCanRaiseRoomAmt())
                {
                    return;
                }

                GetCheckPass();
                if (!Parm.CurrentUserInformation.RoomUserInfo.IsAdmin)
                {
                    Basic.ShowMessage(3, "객실 담당자만 객실요금생성 처리가능 합니다!");
                    return;
                }

                //int iRow = gridView.GetDataSourceRowIndex(gridView.FocusedRowHandle);
                int iRow = dt.Rows.Count;
                iRow++;
                DataTable[] dtProcedure = new DataTable[iRow];

                int i;
                for (i = 0; i < iRow - 1; i++)
                {
                    dtProcedure[i] = DataLayer.GetDataTableParameter(DataLayer.DatatableStyle.Parameter);
                    dtProcedure[i].Rows.Add(new object[] { "V_BIZ_CODE", Parm.CurrentUserInformation.BizInfo.BizCode });
                    dtProcedure[i].Rows.Add(new object[] { "V_FACILITY_CODE", this.lupFacilityCode.EditValue.ToString().Trim() });
                    dtProcedure[i].Rows.Add(new object[] { "V_MNG_NO", dt.Rows[i]["MNG_NO"].ToString().Trim() });
                    dtProcedure[i].Rows.Add(new object[] { "V_MNG_SEQ", dt.Rows[i]["MNG_SEQ"].ToString().Trim() });
                    dtProcedure[i].Rows.Add(new object[] { "V_TASK_DATE", Parm.CurrentUserInformation.roomTask.gsTaskDate });
                    dtProcedure[i].Rows.Add(new object[] { "V_AUTO_RAISE_YN", "Y" });
                    dtProcedure[i].Rows.Add(new object[] { "V_FACI_PART", dt.Rows[i]["FACI_PART"].ToString().Trim() });
                    dtProcedure[i].Rows.Add(new object[] { "V_RMRK", dt.Rows[i]["RMRK"].ToString().Trim() });
                    dtProcedure[i].Rows.Add(new object[] { "V_EMP_NO", Parm.CurrentUserInformation.RoomUserInfo.Emp_No });
                    dtProcedure[i].Rows.Add(new object[] { "V_IP", Parm.CurrentUserInformation.ip });
                    dtProcedure[i].TableName = "PKG_DEAAI01.PR_21";
                }
                //i++;
                dtProcedure[i] = DataLayer.GetDataTableParameter(DataLayer.DatatableStyle.Parameter);
                dtProcedure[i].Rows.Add(new object[] { "V_BIZ_CODE", Parm.CurrentUserInformation.BizInfo.BizCode });
                dtProcedure[i].Rows.Add(new object[] { "V_FACILITY_CODE", this.lupFacilityCode.EditValue.ToString().Trim() });
                dtProcedure[i].Rows.Add(new object[] { "V_TASK_DATE", Parm.CurrentUserInformation.roomTask.gsTaskDate });
                dtProcedure[i].Rows.Add(new object[] { "V_EMP_NO", Parm.CurrentUserInformation.RoomUserInfo.Emp_No });
                dtProcedure[i].Rows.Add(new object[] { "V_IP", Parm.CurrentUserInformation.ip });
                dtProcedure[i].Rows.Add(new object[] { "V_EDITSTATUS", Parm_D.EDIT_STATUS_UPDATE });
                dtProcedure[i].TableName = "PKG_DEAAI01.PR_27";


                DataSet ds = DataLayer.AddProdedcure(dtProcedure);

                string Result = DataLayer.ExecuteSpScalaTransaction(ds, "OK", DataLayer.MessageEncoding.Default);


                //프로시져 에러라면 빠져나간다.
                if (Result.Trim() != "OK")
                {
                    Basic.ShowMessage(3, Result);
                    return;
                }

                //입력한 데이터를 조회 를 합니다...
                Selects(false);

                Basic.ShowMessage(1, "객실료 발생처리 하였습니다.");
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                Basic.SetCursor(this, true);
                Basic.LoadParentFunction(this, "", false);
            }
        }
예제 #27
0
        /// <summary>
        /// 수정함수
        /// </summary>
        private void Updates()
        {
            try
            {
                //유효성 검사후 실행합니다.
                if (!ISCheckData(JobStyle.UPDATE))
                {
                    return;
                }
                DataTable dtChang = dt.GetChanges();

                if (dtChang == null || dtChang.Rows.Count <= 0 || dt.Rows.Count <= 0)
                {
                    Basic.ShowMessage(1, "수정된 데이터가 없습니다.");
                    return;
                }


                //영업 from
                string datefrom = Basic.MaskReplace(txtDatefrom.Text.Trim());
                //조회함수를 구현합니다.
                //만약 변수가 필요없다면 아래 코드를 삭제 하세요
                DataTable dtparmSelect = DataLayer.GetDataTableParameter(DataLayer.DatatableStyle.Parameter);
                dtparmSelect.Rows.Add(new object[] { "V_BIZ_CODE", Parm.CurrentUserInformation.BizInfo.BizCode });
                dtparmSelect.Rows.Add(new object[] { "V_SALE_DATE", datefrom });
                // dtparmSelect.Rows.Add(new object[] { "V_MEMBER_NO", this.txtMemberNoSelect.Text.Trim() });

                DataSet ds = DataLayer.ExecuteSpDataset("PKG_JIAAI01.PR_02", dtparmSelect, DataLayer.MessageEncoding.Default);
                dt.Clear();

                if (ds.Tables[0].Rows[0][0].ToString() == "Y")
                {
                    Basic.ShowMessage(1, "신용카드 마감되어 수정 할 수 없습니다.");
                    return;
                }
                Basic.SetCursor(this, false);
                Basic.LoadParentFunction(this, "일괄 수정 중..", false);


                DataTable[] dtParm = new DataTable[dtChang.Rows.Count];

                string PAY_SEQ = Convert.ToString(gridView.GetRowCellValue(gridView.FocusedRowHandle, "PAY_SEQ"));


                for (int i = 0; i < dtChang.Rows.Count; i++)
                {
                    string sale_amt        = dtChang.Rows[i]["SALE_AMT"].ToString().Trim();
                    string card_no         = dtChang.Rows[i]["CARD_NO"].ToString();
                    string valid_thru      = dtChang.Rows[i]["VALID_THRU"].ToString().Trim().Replace("-", "");
                    string installment_cnt = dtChang.Rows[i]["INSTALLMENT_CNT"].ToString().Trim();
                    string agree_no        = dtChang.Rows[i]["AGREE_NO"].ToString().Trim();
                    string org_agree_no    = dtChang.Rows[i]["ORG_AGREE_NO"].ToString().Trim();
                    string card_co_code    = dtChang.Rows[i]["CARD_CO_CODE"].ToString().Trim();
                    string card_co_name    = dtChang.Rows[i]["CARD_CO_NAME"].ToString().Trim();
                    string issu_co_code    = dtChang.Rows[i]["ISSU_CO_CODE"].ToString().Trim();
                    string issu_co_name    = dtChang.Rows[i]["ISSU_CO_NAME"].ToString().Trim();
                    string agree_date      = dtChang.Rows[i]["AGREE_DATE"].ToString().Trim().Replace("-", "");
                    string emp_no          = BizCommon.Parm.CurrentUserInformation.id;
                    string sale_date       = dtChang.Rows[i]["SALE_DATE"].ToString().Trim().Replace("-", "");
                    string facility_code   = dtChang.Rows[i]["FACILITY_CODE"].ToString().Trim();
                    string pos_no          = dtChang.Rows[i]["POS_NO"].ToString().Trim();
                    string bill_no         = dtChang.Rows[i]["BILL_NO"].ToString().Trim();
                    string sale_yn         = dtChang.Rows[i]["SALE_YN"].ToString().Trim();
                    string pay_seq         = dtChang.Rows[i]["PAY_SEQ"].ToString().Trim();

                    dtParm[i]           = DataLayer.GetDataTableParameter(DataLayer.DatatableStyle.Parameter);
                    dtParm[i].TableName = "PKG_JIAAI01.PR_20";
                    dtParm[i].Rows.Add(new object[] { "V_BIZ_CODE", Parm.CurrentUserInformation.BizInfo.BizCode });
                    dtParm[i].Rows.Add(new object[] { "V_SALE_AMT", sale_amt });
                    dtParm[i].Rows.Add(new object[] { "V_CARD_NO", card_no });
                    dtParm[i].Rows.Add(new object[] { "V_VALID_THRU", valid_thru });
                    dtParm[i].Rows.Add(new object[] { "V_INSTALLMENT_CNT", installment_cnt });
                    dtParm[i].Rows.Add(new object[] { "V_AGREE_NO", agree_no });
                    dtParm[i].Rows.Add(new object[] { "V_ORG_AGREE_NO", org_agree_no });
                    dtParm[i].Rows.Add(new object[] { "V_CARD_CO_CODE", card_co_code });
                    dtParm[i].Rows.Add(new object[] { "V_CARD_CO_NAME", card_co_name });
                    dtParm[i].Rows.Add(new object[] { "V_ISSU_CO_CODE", issu_co_code });
                    dtParm[i].Rows.Add(new object[] { "V_ISSU_CO_NAME", issu_co_name });
                    dtParm[i].Rows.Add(new object[] { "V_AGREE_DATE", agree_date.Replace("-", "") });
                    dtParm[i].Rows.Add(new object[] { "V_EMP_NO", emp_no });
                    dtParm[i].Rows.Add(new object[] { "V_IP", BizCommon.Parm.CurrentUserInformation.ip });
                    dtParm[i].Rows.Add(new object[] { "V_SALE_DATE", sale_date.Replace("-", "") });
                    dtParm[i].Rows.Add(new object[] { "V_FACILITY_CODE", facility_code });
                    dtParm[i].Rows.Add(new object[] { "V_POS_NO", pos_no });
                    dtParm[i].Rows.Add(new object[] { "V_BILL_NO", bill_no });
                    dtParm[i].Rows.Add(new object[] { "V_SALE_YN", sale_yn });
                    dtParm[i].Rows.Add(new object[] { "V_PAY_SEQ", pay_seq });
                    dtParm[i].Rows.Add(new object[] { "V_STATUS", "U" });
                }

                DataSet dsParm = DataLayer.AddProdedcure(dtParm);
                //프로시져를 호출하여 결과를 리턴 받는다.V_STATUS
                //만약 output 값이 여러개라면 '|' (파이프) 값으로 구분하여 들어온다.
                //Split 함수로 짤라서 사용한다.
                string Result = DataLayer.ExecuteSpScalaTransaction(dsParm, "OK", DataLayer.MessageEncoding.Default);

                //프로시져 에러라면 빠져나간다.
                if (Result.Trim() != "OK")
                {
                    Basic.ShowMessage(1, Result);
                    return;
                }

                //수정한 데이터를 조회 를 합니다...
                Selects(false);
                Basic.ShowMessage(1, "일괄 수정 하였습니다.");
            }
            catch (Exception ex)
            {
                Basic.ShowMessage(3, ex.Message);
            }
            finally
            {
                Basic.SetCursor(this, true);
                Basic.LoadParentFunction(this, "", false);
            }
        }
예제 #28
0
        /// <summary>
        /// 확인을 눌렀을 경우
        /// </summary>
        private void fnSave()
        {
            try
            {
                //입력된 값에서 0보다 작은 값이 있는 찾는다.


                if (dt.Rows.Count <= 0)
                {
                    InvokeOnClick(this.btnClose, new EventArgs());
                    return;
                }

                int cnt = int.Parse(dt.Compute("COUNT(USE_DATE)", "DC_STND_AMT < 0").ToString().Trim());

                if (cnt > 0)
                {
                    Basic.ShowMessage(1, "입력된 할인금액중 0 보다 작은 값이 있습니다.");
                    return;
                }

                cnt = 0;
                cnt = int.Parse(dt.Compute("COUNT(USE_DATE)", "DC_STND_AMT <> DC_STND_AMT_DC").ToString().Trim());

                DataTable dtTmp = Basic.GetdtSelect(dt, "DC_STND_AMT <> DC_STND_AMT_DC", "");

                if (cnt > 0)
                {
                    IsChange = true;
                }

                if (IsChange && pSettings.IsSave)
                {
                    DAHAH05 f = new DAHAH05(pSettings.FacilityCode, "Getpass");
                    f.Owner = this;
                    f.ShowDialog();
                    //return;
                }
                //리턴한다.
                //금일요금, 총요금, 변경여부
                DataRow r = dt.Rows.Find(pSettings.TaskDate);
                if (r == null)
                {
                    Basic.ShowMessage(1, "금일요금이 없습니다.");
                    return;
                }
                //총요금
                string TotAmt = dt.Compute("SUM(DC_STND_AMT)", "").ToString().Trim() == "" ? "0" :
                                dt.Compute("SUM(DC_STND_AMT)", "").ToString().Trim();
                string NowAmt = r["DC_STND_AMT"].ToString().Trim();

                //string TotAmt = dt.Compute("SUM(STND_AMT)", "").ToString().Trim() == "" ? "0" :
                //                                                                              dt.Compute("SUM(STND_AMT)", "").ToString().Trim();
                //string NowAmt = r["STND_AMT"].ToString().Trim();

                /*
                 *  변경된건을 DB에 넣는다.
                 */
                if (dtTmp.Rows.Count > 0 && pSettings.IsSave)
                {
                    DataTable[] dtParm = new DataTable[dtTmp.Rows.Count];

                    for (int index = 0; index < dtTmp.Rows.Count; index++)
                    {
                        //string appdate   = dtTmp.Rows[index]["USE_DATE"].ToString().Trim();
                        //string menucode  = dtTmp.Rows[index]["MENU_CODE"].ToString().Trim();
                        //string menuitem1 = dtTmp.Rows[index]["MENU_ITEM11"].ToString().Trim();
                        //string menuitem2 = dtTmp.Rows[index]["MENU_ITEM12"].ToString().Trim();
                        //string menuitem3 = dtTmp.Rows[index]["MENU_ITEM13"].ToString().Trim();
                        //string menuitem4 = dtTmp.Rows[index]["MENU_ITEM14"].ToString().Trim();
                        //string menuitem5 = dtTmp.Rows[index]["MENU_ITEM15"].ToString().Trim();
                        //string menudate  = dtTmp.Rows[index]["MENU_DATE"].ToString().Trim();
                        //string stdamt    = dtTmp.Rows[index]["DC_STND_AMT"].ToString().Trim();
                        //string dcrate    = dtTmp.Rows[index]["DC_RATE"].ToString().Trim();
                        //string appamt    = dtTmp.Rows[index]["UNIT_AMT"].ToString().Trim();
                        //string fnbamt    = dtTmp.Rows[index]["FNB_AMT"].ToString().Trim();


                        string appdate   = dtTmp.Rows[index]["USE_DATE"].ToString().Trim();
                        string menucode  = dtTmp.Rows[index]["MENU_CODE"].ToString().Trim();
                        string menuitem1 = dtTmp.Rows[index]["MENU_ITEM11"].ToString().Trim();
                        string menuitem2 = dtTmp.Rows[index]["MENU_ITEM2"].ToString().Trim();
                        string menuitem3 = dtTmp.Rows[index]["MENU_ITEM3"].ToString().Trim();
                        string menuitem4 = dtTmp.Rows[index]["MENU_ITEM4"].ToString().Trim();
                        string menuitem5 = dtTmp.Rows[index]["MENU_ITEM5"].ToString().Trim();
                        string menudate  = dtTmp.Rows[index]["MENU_DATE"].ToString().Trim();
                        string stdamt    = dtTmp.Rows[index]["DC_STND_AMT"].ToString().Trim();
                        string dcrate    = dtTmp.Rows[index]["DC_RATE"].ToString().Trim();
                        string appamt    = dtTmp.Rows[index]["UNIT_AMT"].ToString().Trim();
                        string fnbamt    = dtTmp.Rows[index]["FNB_AMT"].ToString().Trim();



                        dtParm[index] = DataLayer.GetDataTableParameter(DataLayer.DatatableStyle.Parameter);

                        dtParm[index].TableName = "PKG_DAAAI10.PR_18";
                        dtParm[index].Rows.Add(new object[] { "V_BIZ_CODE", Parm.CurrentUserInformation.BizInfo.BizCode });
                        dtParm[index].Rows.Add(new object[] { "V_APP_DATE", Basic.MaskReplace(appdate) });
                        dtParm[index].Rows.Add(new object[] { "V_FACILITY_CODE", pSettings.FacilityCode });
                        dtParm[index].Rows.Add(new object[] { "V_MNG_NO", pSettings.MngNo });
                        dtParm[index].Rows.Add(new object[] { "V_MNG_SEQ", pSettings.MngSeq });
                        dtParm[index].Rows.Add(new object[] { "V_RSV_NO", pSettings.RsvNo });
                        dtParm[index].Rows.Add(new object[] { "V_CHECKIN_TYPE", "0" });
                        dtParm[index].Rows.Add(new object[] { "V_MENU_CODE", menucode });
                        dtParm[index].Rows.Add(new object[] { "V_MENU_ITEM1", menuitem1 });
                        dtParm[index].Rows.Add(new object[] { "V_MENU_ITEM2", menuitem2 });
                        dtParm[index].Rows.Add(new object[] { "V_MENU_ITEM3", menuitem3 });
                        dtParm[index].Rows.Add(new object[] { "V_MENU_ITEM4", menuitem4 });
                        dtParm[index].Rows.Add(new object[] { "V_MENU_ITEM5", menuitem5 });
                        dtParm[index].Rows.Add(new object[] { "V_MENU_DATE", menudate });
                        dtParm[index].Rows.Add(new object[] { "V_STND_AMT", stdamt });
                        dtParm[index].Rows.Add(new object[] { "V_DC_RATE", dcrate });
                        dtParm[index].Rows.Add(new object[] { "V_APP_AMT", appamt });
                        dtParm[index].Rows.Add(new object[] { "V_FNB_AMT", fnbamt });
                        dtParm[index].Rows.Add(new object[] { "V_CHANGE_RATE_REASON", "" });
                        dtParm[index].Rows.Add(new object[] { "V_EMP_NO", Parm.CurrentUserInformation.RoomUserInfo.Emp_No });
                        dtParm[index].Rows.Add(new object[] { "V_IP", Parm.CurrentUserInformation.ip });
                    }

                    DataSet dsTmp = DataLayer.AddProdedcure(dtParm);
                    string  v_ret = DataLayer.ExecuteSpScalaTransaction(dsTmp, "OK", DataLayer.MessageEncoding.Default);

                    if (v_ret != "OK")
                    {
                        Basic.ShowMessage(1, v_ret);
                        dt.RejectChanges();
                        return;
                    }
                }



                dt.AcceptChanges();

                //for(int u = 0; u < dt.Rows.Count; u++)
                //    dt.Rows[u]["STND_AMT"] = int.Parse(dt.Rows[u]["DC_STND_AMT"].ToString().Trim().Replace(",",""));

                dt.Columns.Remove("DC_STND_AMT_DC");

                Basic.LoadParentFunction(this, fnReturnFunctionName, new object[] { TotAmt, NowAmt, IsChange, dt });

                this.InvokeOnClick(this.btnClose, new EventArgs());
            }
            catch (Exception ex)
            {
                dt.RejectChanges();
                throw ex;
            }
        }
        /// <summary>
        /// 현금결제처리
        /// </summary>
        /// <param name="amt">금액</param>
        /// <param name="IsCheckBill">현금영수증<c>true</c> [is check bill].</param>
        /// <param name="paycodeInput">입금코드</param>
        /// <param name="agreeno">현금영수증승인번호</param>
        /// <param name="empNo">The emp no.</param>
        /// <returns></returns>
        /// <remarks>
        /// 현금결제인데도 불구하고 현금영수증 여부나 입금코드를 받는 이유는
        /// 객실 선수금일때 카드결제시에도 현금 로직을 태워야되기때문이다.
        /// </remarks>
        private string  fn_110(string amt, bool IsCheckBill, string paycodeInput, string agreeno, string empNo, string references)
        {
            string strReturn = "";
            /*-------------------------------------------------------------------------------------------------------*/
            // 현금영수증
            /*-------------------------------------------------------------------------------------------------------*/
            string bill_saledate     = "";      //영업일자
            string bill_bizcode      = "";      //사업장코드
            string bill_facilitycode = "";      //영업장코드
            string bill_posno        = "";      //포스번호
            string bill_biilno       = "";      //전표번호
            string bill_saleyn       = "";      //판매여부
            string bill_payseq       = "0";     //순번 // 현금영수증이 있으면 체번한 값을 없으면 Default 0 값이 들어간다.
            string bill_agreeyn      = "";      //승인번호
            string bill_saleamt      = "";      //판매금액
            string bill_pe_co_code   = "";      //법인개인구분
            string bill_id_no_code   = "";      //식별코드
            string bill_id_no        = "";      //식별번호
            string bill_agreeno      = "";      //승인번호
            string bill_keyinyn      = "";      //이지체여부
            string bill_date         = "";      //정의없음


            try
            {
                //현금영수증 체크
                if (IsCheckBill)
                {
                    if (Basic.MaskReplace(Num.GetNumberOnly(PayInfomation.RoomInfo.C_Facipart)) + Basic.MaskReplace(Num.GetNumberOnly(PayInfomation.RoomInfo.C_RoomNo)).Trim() == "")
                    {
                        return("Bill 번호를 생성 할 수 없습니다.\n\r\n\r동코드:" + PayInfomation.RoomInfo.C_Facipart + "\r\n객실번호:" + PayInfomation.RoomInfo.C_RoomNo);
                    }



                    bill_saledate     = PayInfomation.RoomInfo.C_Taskdate;                                                                                                               //영업일자
                    bill_bizcode      = PayInfomation.RoomInfo.C_Bizcode;                                                                                                                //사업장코드
                    bill_facilitycode = PayInfomation.RoomInfo.C_Facilitycode;                                                                                                           //영업장코드
                    bill_posno        = "01";                                                                                                                                            //포스번호
                    bill_biilno       = Basic.MaskReplace(Num.GetNumberOnly(PayInfomation.RoomInfo.C_Facipart)) + Basic.MaskReplace(Num.GetNumberOnly(PayInfomation.RoomInfo.C_RoomNo)); //전표번호
                    bill_saleyn       = "Y";                                                                                                                                             //판매여부
                    bill_payseq       = "일련번호-체번한다.";                                                                                                                                    //순번
                    bill_agreeyn      = "Y";                                                                                                                                             //승인여부
                    switch (TabControl.SelectedTabPage.Name)
                    {
                    case "tp_1":                                                          //현금
                        bill_saleamt    = Basic.MaskReplace(txtCashAmt.Text.Trim());      //판매금액
                        bill_pe_co_code = optCashBillKind.SelectedIndex < 1 ? "P" : "C";  //법인C 개인구분 P
                        bill_id_no_code = lupCashBill_IdCode.EditValue.ToString().Trim(); //식별코드
                        bill_id_no      = txtCashBillRegNo.Text.Trim();                   //식별번호
                        break;

                    case "tp_10":                                                             // 예금
                        bill_saleamt    = Basic.MaskReplace(txtBankAmt.Text.Trim());          //판매금액
                        bill_pe_co_code = optBankCashBillKind.SelectedIndex < 1 ? "P" : "C";  //법인C 개인구분 P
                        bill_id_no_code = lupBankCashBill_IdCode.EditValue.ToString().Trim(); //식별코드
                        bill_id_no      = txtBankCashBillRegNo.Text.Trim();                   //식별번호
                        break;
                    }

                    if (bill_id_no.Length <= 0)
                    {
                        DataRow[] dr = Parm.mDataTable.dtZx010ms.Select("HEAD = 'Z0028' AND DETAIL = '0' AND USE_YN = 'Y' ");
                        if (dr.Length > 0 && int.Parse(dr[0]["ITEM2"].ToString()) < int.Parse(bill_saleamt))
                        {
                            bill_id_no_code = "0";
                            bill_id_no      = dr[0]["ITEM1"].ToString();
                        }
                    }



                    bill_agreeno = agreeno;  //승인번호
                    bill_keyinyn = "N";      //이지체크를 통해 들어왔는지
                    bill_date    = "";       //정의없음

                    DataTable dtParmBill = DataLayer.GetDataTableParameter(DataLayer.DatatableStyle.Parameter);
                    dtParmBill.Rows.Add(new object[] { "V_BIZ_CODE", bill_bizcode });
                    dtParmBill.Rows.Add(new object[] { "V_FACILITY_CODE", bill_facilitycode });
                    dtParmBill.Rows.Add(new object[] { "V_POS_NO", bill_posno });
                    dtParmBill.Rows.Add(new object[] { "V_SALE_DATE", bill_saledate });
                    dtParmBill.Rows.Add(new object[] { "V_BILL_NO", bill_biilno });
                    dtParmBill.Rows.Add(new object[] { "V_SALE_YN", "Y" });

                    string billSeq = DataLayer.ExecuteSpScala("PKG_DAZAZ02.PR_IAA031MS_PAYSEQ", dtParmBill, DataLayer.MessageEncoding.Default);
                    bill_payseq = billSeq;
                }

                if (PayInfomation.useKind == UseKind.Room)
                {
                    /*-------------------------------------------------------------------------------------------------------*/
                    //  Room 일때
                    /*-------------------------------------------------------------------------------------------------------*/
                    string bizcode      = "";    //사업장코드
                    string facilitycode = "";    //영업장코드
                    string mngno        = "";    //관리번호
                    string mngseq       = "";    //관리순번
                    string taskdate     = "";    //작업일자
                    string keyseq       = "";    //일련번호
                    string rasiecode    = "";    //발생코드
                    string paycode      = "";    //결제코드
                    string payamt       = "";    //결제금액
                    string itemstat     = "";    //상태
                    string facipart     = "";    //동코드
                    string reference    = "";    //참고(카드번호,승인번호/락카번호/연회번호/상품권번호/회원번호)
                    string seqno        = "";    //순번
                    string rmrk         = "";    //비고

                    string co_facilitycode = ""; //이체영업장코드
                    string co_mngcode      = ""; //이체관리번호
                    string co_mngseq       = ""; //이체관리순번
                    string co_taskdate     = ""; //이체영업일자
                    string co_keyseq       = ""; //이체일련번호

                    string st_facilitycode = ""; //최초영업장코드
                    string st_mngno        = ""; //최초관리번호
                    string st_mngseq       = ""; //최초관리순번
                    string st_taskdate     = ""; //최초영업일자
                    string st_keyseq       = ""; //최초일련번호

                    //string empno           = ""; //사원번호
                    string ip         = "";      //아이피
                    string editstatus = "";      //작업구분


                    bizcode      = PayInfomation.RoomInfo.C_Bizcode;
                    facilitycode = PayInfomation.RoomInfo.C_Facilitycode;
                    mngno        = PayInfomation.RoomInfo.C_Mngno;
                    mngseq       = PayInfomation.RoomInfo.C_Mngseq;
                    taskdate     = PayInfomation.RoomInfo.C_Taskdate;
                    keyseq       = "일련번호";
                    rasiecode    = ((int)PayInfomation.RaseCode).ToString();
                    paycode      = paycodeInput;
                    payamt       = amt;
                    itemstat     = "N";
                    facipart     = PayInfomation.RoomInfo.C_Facipart;
                    reference    = references;
                    seqno        = bill_payseq;
                    rmrk         = agreeno;

                    co_facilitycode = PayInfomation.RoomInfo.CO_Facilitycode;
                    co_mngcode      = PayInfomation.RoomInfo.CO_Mngcode;
                    co_mngseq       = PayInfomation.RoomInfo.CO_Mngseq;
                    co_taskdate     = PayInfomation.RoomInfo.CO_Taskdate;
                    co_keyseq       = PayInfomation.RoomInfo.CO_Keyseq;

                    st_facilitycode = PayInfomation.RoomInfo.ST_Facilitycode;
                    st_mngno        = PayInfomation.RoomInfo.ST_Mngno;
                    st_mngseq       = PayInfomation.RoomInfo.ST_Mngseq;
                    st_taskdate     = PayInfomation.RoomInfo.ST_Taskdate;
                    st_keyseq       = PayInfomation.RoomInfo.ST_Keyseq;

                    //empno           = Parm.CurrentUserInformation.id;
                    ip         = Parm.CurrentUserInformation.ip;
                    editstatus = "2";



                    //seqno 순번을 가져와서 할당한다.
                    //입금테이블 [DCA030MS]
                    // 사업장코드 // 영업장코드 //관리번호 //관리순번// 영업일자 // == 일련번호//
                    // 순번을 가져온다
                    //PR_KEY_SEQ
                    DataTable dtParm = DataLayer.GetDataTableParameter(DataLayer.DatatableStyle.Parameter);

                    dtParm.Rows.Add(new object[] { "V_BIZ_CODE", bizcode });
                    dtParm.Rows.Add(new object[] { "V_FACILITY_CODE", facilitycode });
                    dtParm.Rows.Add(new object[] { "V_MNG_NO", mngno });
                    dtParm.Rows.Add(new object[] { "V_MNG_SEQ", mngseq });
                    dtParm.Rows.Add(new object[] { "V_TASK_DATE", taskdate });

                    keyseq = DataLayer.ExecuteSpScala("PKG_DAZAZ02.PR_DCA030MS_KEY_SEQ", dtParm, DataLayer.MessageEncoding.Default);

                    // 선수금일때 최초영업장과 //이체영업장을 설정한다.
                    if (PayInfomation.RaseCode == RaseCodeInfo.Deposit)
                    {
                        co_keyseq = co_keyseq == "" ? keyseq : co_keyseq;
                        st_keyseq = st_keyseq == "" ? keyseq : st_keyseq;
                    }
                    else
                    {
                        co_keyseq = keyseq;
                        st_keyseq = keyseq;
                    }

                    DataTable dtcash = Pay.Room_110(bizcode,
                                                    facilitycode,
                                                    mngno,
                                                    mngseq,
                                                    taskdate,
                                                    keyseq,
                                                    rasiecode,
                                                    paycode,
                                                    payamt,
                                                    itemstat,
                                                    facipart, reference,
                                                    seqno,
                                                    rmrk,
                                                    co_facilitycode,
                                                    co_mngcode,
                                                    co_mngseq,
                                                    co_taskdate,
                                                    co_keyseq,
                                                    st_facilitycode,
                                                    st_mngno,
                                                    st_mngseq,
                                                    st_taskdate,
                                                    st_keyseq,
                                                    empNo,
                                                    ip,
                                                    editstatus);

                    DataTable[] dtArry = null;
                    //현금영수증이 없다면 // 현금내역만 담고
                    //그렇지 않으면 현금영수증 내역까지 담아서 트랜잭션처리한다.
                    if (!IsCheckBill)
                    {
                        dtArry = new DataTable[] { dtcash };
                    }
                    else
                    {
                        DataTable dtcashBill = Pay.PayAddBill(bill_saledate,
                                                              bill_bizcode,
                                                              bill_facilitycode,
                                                              bill_posno,
                                                              bill_biilno,
                                                              bill_saleyn,
                                                              bill_payseq,
                                                              bill_agreeyn,
                                                              bill_saleamt,
                                                              bill_pe_co_code,
                                                              bill_id_no_code,
                                                              bill_id_no,
                                                              bill_agreeno,
                                                              bill_saledate,
                                                              bill_keyinyn,   // 이지체크여부에 N을 넘긴다.
                                                              empNo,
                                                              bill_date,
                                                              ip);

                        dtArry = new DataTable[] { dtcash, dtcashBill };
                    }

                    //Application.DoEvents();
                    DataSet dsTmp = DataLayer.AddProdedcure(dtArry);
                    string  v_ret = DataLayer.ExecuteSpScalaTransaction(dsTmp, "OK", DataLayer.MessageEncoding.Default);

                    strReturn = v_ret;
                }
            }
            catch (Exception ex)
            {
                strReturn = ex.Message;
            }

            return(strReturn);
        }
예제 #30
0
        /// <summary>
        /// 영업장마감
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnUpjangClose_Click(object sender, EventArgs e)
        {
            try
            {
                //영업장마감 좌측상단의 마감여부를 체크해서 저장해주는 버튼.
                //전체영업장이 영업장마감이 아닐경우에는 일마감, 일마감취소 버튼 비활성

                //전체 영업장이 영업장마감일 경우
                //일마감이 완료되지 않았을경우 일마감 버튼 활성, 일마감취소버튼 비활성

                //일마감이 완료된경우 일마감취소버튼만 활성

                //영업장 마감 : PKG_SALE_CLOSE.PR_99 EDIT 1
                //일마감 : PKG_SALE_CLOSE EDITSTATUS = '2'
                //일마감취소 : PKG_SALE_CLOSE EDITSTATUS = '3'
                //영업장코드 = '%'

                if (Convert.ToInt32(Basic.MaskReplace(dtpFrom.Text.ToString().Trim())) >= Convert.ToInt32(Basic.MaskReplace(DateTime.Now.ToString("yyyyMMdd"))))
                {
                    Basic.ShowMessage(1, "현 일자 이후 건은 마감 할 수 없습니다.");
                    return;
                }

                if (Basic.ShowMessageQuestion("영업장 마감을 하시겠습니까?") == DialogResult.No)
                {
                    return;
                }

                DataTable dtTmp = gridView1.DataSource as DataTable;
                DataTable tmp   = Basic.GetdtSelect(dt1, "CHECK_CLOSED = 'Y'", "");

                //DataTable[] dtProcedure = new DataTable[tmp.Rows.Count];
                DataTable[] dtProcedure = new DataTable[dt1.Rows.Count];

                for (int i = 0; i < dt1.Rows.Count; i++)
                {
                    //if (tmp.Rows[i]["CHECK_CLOSED"].ToString() == "Y")
                    //{
                    dtProcedure[i]           = DataLayer.GetDataTableParameter(DataLayer.DatatableStyle.Parameter);
                    dtProcedure[i].TableName = "PKG_SALE_CLOSE.PR_01";

                    dtProcedure[i].Rows.Add(new object[] { "V_SALE_DATE", dtpFrom.Text.Trim().Replace("-", "") });
                    dtProcedure[i].Rows.Add(new object[] { "V_BIZ_CODE", Parm.CurrentUserInformation.BizInfo.BizCode });
                    dtProcedure[i].Rows.Add(new object[] { "V_FACILITY_CODE", dt1.Rows[i]["FACILITY_CODE"].ToString().Trim() });
                    dtProcedure[i].Rows.Add(new object[] { "V_CLOSE_YN", dt1.Rows[i]["CHECK_CLOSED"].ToString().Trim() });
                    dtProcedure[i].Rows.Add(new object[] { "V_EMP_NO", BizCommon.Parm.CurrentUserInformation.id });
                    dtProcedure[i].Rows.Add(new object[] { "V_IP", BizCommon.Parm.CurrentUserInformation.ip });
                    dtProcedure[i].Rows.Add(new object[] { "V_EDITSTATUS", "1" });

                    //}
                }
                //프로시져를 호출하여 결과를 리턴 받는다.
                //만약 output 값이 여러개라면 '|' (파이프) 값으로 구분하여 들어온다.
                //Split 함수로 짤라서 사용한다.
                DataSet ds     = DataLayer.AddProdedcure(dtProcedure);
                string  Result = DataLayer.ExecuteSpScalaTransaction(ds, "OK", DataLayer.MessageEncoding.Default);

                if (Result != "OK")
                {
                    Basic.ShowMessage(3, Result);
                    return;
                }

                fnSelect();

                Basic.ShowMessage(1, "완료 되었습니다.");
            }
            catch (Exception ex)
            {
                Basic.ShowMessage(3, ex.Message);
            }
            finally
            {
                Basic.SetCursor(this, true);
                Basic.LoadParentFunction(this, "", false);
            }
        }