private void F12()
        {
            if (ErrorCheck(12))
            {
                if (mstaffBL.ShowMessage(OperationMode == EOperationMode.DELETE ? "Q102" : "Q101") == DialogResult.Yes)
                {
                    //*** Create Entity Object
                    staffdata = GetStaffEntity();
                    switch (OperationMode)
                    {
                    case EOperationMode.INSERT:
                        InsertUpdate(1);
                        break;

                    case EOperationMode.UPDATE:
                        InsertUpdate(2);
                        break;

                    case EOperationMode.DELETE:
                        Delete();
                        break;
                    }
                }
                else
                {
                    PreviousCtrl.Focus();
                }
            }
        }
Esempio n. 2
0
        private void F12()
        {
            if (ErrorCheck(12))
            {
                //*** Create Entity Object
                //mse = GetSoukoEntity();
                if (mtbstbl.ShowMessage(OperationMode == EOperationMode.DELETE ? "Q102" : "Q101") == DialogResult.Yes)
                {
                    mbste = GetBankBranchEntity();
                    switch (OperationMode)
                    {
                    case EOperationMode.INSERT:
                        InsertUpdate(1);
                        break;

                    case EOperationMode.UPDATE:
                        InsertUpdate(2);
                        break;

                    case EOperationMode.DELETE:
                        Delete();
                        break;
                    }
                }
                else
                {
                    PreviousCtrl.Focus();
                }
            }
        }
        private void Save()
        {
            if (ErrorCheck())
            {
                if (tprg_Kaiin_BL.ShowMessage("Q101") == DialogResult.Yes)
                {
                    cust = new M_Customer_Entity();

                    cust = GetTempoRegiKaiinToroku();

                    if (chkDelete.Visible == false)
                    {
                        cust.ProcessMode = "新規";
                        InsertUpdate(1);
                    }
                    else if (chkDelete.Visible == true)
                    {
                        cust.ProcessMode = "変更";
                        InsertUpdate(2);
                    }
                }
                else
                {
                    //PreviousCtrl = this.ActiveControl;
                    PreviousCtrl.Focus();
                }
            }
        }
        private void F12()
        {
            if (ErrorCheck(12))
            {
                dpe = GetPayData();
                if (bbl.ShowMessage(OperationMode == EOperationMode.DELETE ? "Q102" : "Q101") == DialogResult.Yes)
                {
                    switch (OperationMode)
                    {
                    case EOperationMode.INSERT:
                        Insert();
                        break;

                    case EOperationMode.UPDATE:
                        Update();
                        break;

                    case EOperationMode.DELETE:
                        Delete();
                        break;
                    }
                }
                else
                {
                    PreviousCtrl.Focus();
                }
            }
        }
Esempio n. 5
0
        private void F12()
        {
            if (ErrorCheck(12))
            {
                if (mpbl.ShowMessage(OperationMode == EOperationMode.DELETE ? "Q102" : "Q101") == DialogResult.Yes)


                {
                    mpe = GetProgramEntity();
                    switch (OperationMode)
                    {
                    case EOperationMode.INSERT:
                        InsertUpdate(1);
                        break;

                    case EOperationMode.UPDATE:
                        InsertUpdate(2);
                        break;

                    case EOperationMode.DELETE:
                        Delete();
                        break;
                    }
                }
                else
                {
                    PreviousCtrl.Focus();
                }
            }
        }
 public override void FunctionProcess(string tagID)
 {
     if (tagID == "6")
     {
         cf.Clear(PanelTitle);
         cf.Clear(PanelDetail);
         lbl_dataPartition.Text = "";
         lbl_InputPerson.Text   = "";
     }
     if (tagID == "7")
     {
         OnCheck();
     }
     if (tagID == "8")
     {
         OFFCheck();
     }
     if (tagID == "10")
     {
         if (ErrorCheck(PanelTitle))
         {
             btnDisplay();
             if (gvHaitaSakujo.Rows.Count > 0)
             {
                 gvHaitaSakujo.CurrentCell = gvHaitaSakujo.Rows[0].Cells["col_Target"];
                 Control btnF9 = this.TopLevelControl.Controls.Find("BtnF9", true)[0];
                 btnF9.Visible = false;
             }
         }
     }
     if (tagID == "12")
     {
         if (!IsCheckExist())
         {
             bll.ShowMessage("E257");
             F12.Focus();
             return;
         }
         else
         {
             if (bll.ShowMessage("Q101") != DialogResult.Yes)
             {
                 if (PreviousCtrl != null)
                 {
                     PreviousCtrl.Focus();
                 }
             }
             else
             {
                 btnClearExclusive();
             }
         }
     }
 }
        private void ButtonFunction(string buttonTag)
        {
            short Index = Convert.ToInt16(buttonTag);

            // 終了ファンクション
            if (Index + 1 == FuncEnd)
            {
                if (!ShowCloseMessage)
                {
                    EndSec();
                }
                else if (bbl.ShowMessage("Q003") == DialogResult.Yes)
                {
                    var ctrl = GetAllControls(this);


                    foreach (var ctrlTxt in ctrl)
                    {
                        if (ctrlTxt is CKM_TextBox)
                        {
                            ((CKM_TextBox)ctrlTxt).isClosing = true;
                        }
                        //ctrlTxt.isClosing = true;
                    }
                    EndSec();
                }
                else
                {
                    if (PreviousCtrl != null)
                    {
                        PreviousCtrl.Focus();
                    }
                    else
                    {
                        btnClose.Focus();
                    }
                }
                return;
            }
            //else if (Index < 5)
            //{
            //    //処理モード変更時  Todo:入力プログラム以外を考慮
            //    if (bbl.ShowMessage("Q101") != DialogResult.Yes)
            //    {
            //        PreviousCtrl.Focus();
            //        return;
            //    }
            //}
            FunctionProcess(Index);
        }
        public override void FunctionProcess(int index)
        {
            switch (index + 1)
            {
            case 2:
                ChangeMode(EOperationMode.INSERT);
                F12Visible = true;
                break;

            case 3:
                ChangeMode(EOperationMode.UPDATE);
                F12Visible = true;
                break;

            case 4:
                ChangeMode(EOperationMode.DELETE);
                F12Visible = true;
                break;

            case 5:
                ChangeMode(EOperationMode.SHOW);
                F12Visible = false;
                break;

            case 6:
                if (bbl.ShowMessage("Q004") == DialogResult.Yes)
                {
                    ChangeMode(OperationMode);
                    ScPaymentProcessNum.SetFocus(1);
                }
                else
                {
                    PreviousCtrl.Focus();
                }
                break;

            case 7:
                F7();
                break;

            case 11:
                F11();
                break;

            case 12:
                F12();
                break;
            }
        }
        ///
        /// <summary>
        /// 登録ボタンを押下時データベースにInsertする
        /// </summary>
        public void Save()
        {
            if (ErrorCheck())
            {
                if (ExchangeLabel.Text != ExchangeMoney.Text)
                {
                    trrnbl.ShowMessage("E181");
                    ExchangeCount.Focus();
                }
                else
                {
                    if (trrnbl.ShowMessage("Q101") == DialogResult.Yes)
                    {
                        DataTable dt = new DataTable();
                        dt = trrnbl.SimpleSelect1("70", ChangeDate.Replace("/", "-"), storeCD);
                        if (dt.Rows.Count > 0)
                        {
                            trrnbl.ShowMessage("E252");
                        }
                        valid = false;
                        mre   = DepositHistoryEnity();
                        if (trrnbl.TempoRegiRyougaeNyuuryoku_Insert_Update(mre))
                        {
                            trrnbl.ShowMessage("I101");

                            RunConsole();
                            //exeRun

                            ExchangeDenomination.SelectedValue = "-1";
                            ExchangeMoney.Clear();
                            ExchangeCount.Clear();
                            ExchangeLabel.Text = "";
                            Remark.Clear();
                            ExchangeMoney.Focus();
                        }
                        else
                        {
                            trrnbl.ShowMessage("S001");
                        }
                    }
                    else
                    {
                        PreviousCtrl.Focus();
                        //Remark.Focus();
                    }
                }
            }
        }
        /// <summary>
        /// Handle F1 to F12 Click
        /// </summary>
        /// <param name="index"> button index+1, eg.if index is 0,it means F1 click </param>
        public override void FunctionProcess(int index)
        {
            CKM_SearchControl sc = new CKM_SearchControl();

            mtbbl = new MasterTouroku_GinkouKouza_BL();
            switch (index + 1)
            {
            case 2:
                ChangeMode(EOperationMode.INSERT);
                break;

            case 3:
                ChangeMode(EOperationMode.UPDATE);
                break;

            case 4:
                ChangeMode(EOperationMode.DELETE);
                break;

            case 5:
                ChangeMode(EOperationMode.SHOW);
                break;

            case 6:
                if (bbl.ShowMessage("Q004") == DialogResult.Yes)
                {
                    ChangeMode(OperationMode);
                    ScKouzaCD.SetFocus(1);
                }
                else
                {
                    PreviousCtrl.Focus();
                }


                break;

            case 11:
                F11();
                break;

            case 12:
                F12();
                break;
            }
        }
Esempio n. 11
0
        /// <summary>
        /// Handle F1 to F12 Click
        /// </summary>
        /// <param name="index"> button index+1, eg.if index is 0,it means F1 click </param>
        public override void FunctionProcess(int index)
        {
            switch (index + 1)
            {
            case 2:
                ChangeMode(EOperationMode.INSERT);
                break;

            case 3:
                ChangeMode(EOperationMode.UPDATE);
                break;

            case 4:
                ChangeMode(EOperationMode.DELETE);
                break;

            case 5:
                ChangeMode(EOperationMode.SHOW);
                break;

            case 6:
                if (bbl.ShowMessage("Q004") == DialogResult.Yes)
                {
                    ChangeMode(OperationMode);
                    ScID.SetFocus(1);
                }
                else
                {
                    PreviousCtrl.Focus();
                }
                break;

            case 11:
                F11();
                break;

            case 12:
                //ErrorCheck(12);
                //if (mthbl.ShowMessage(OperationMode == EOperationMode.DELETE ? "Q102" : "Q101") == DialogResult.Yes)
                F12();
                break;
            }
        }
Esempio n. 12
0
 private void F12()
 {
     if (ErrorCheck(12))
     {
         if (YuubinBangouBL.ShowMessage(OperationMode == EOperationMode.DELETE ? "Q102" : "Q101") == DialogResult.Yes)
         {
             switch (OperationMode)
             {
             case EOperationMode.UPDATE:
                 UpdateInsert();
                 break;
             }
         }
         else
         {
             PreviousCtrl.Focus();
         }
     }
 }
Esempio n. 13
0
 private void F12()
 {
     if (!string.IsNullOrWhiteSpace(txtMonth.Text))
     {
         if (mtcbl.ShowMessage("Q101") == DialogResult.Yes)
         {
             CreateDataTable();
             mce = GetCalendarEntity();
             InsertUpdate();
         }
         else
         {
             PreviousCtrl.Focus();
         }
     }
     else
     {
         mtcbl.ShowMessage("E102");
         txtMonth.Focus();
     }
 }
Esempio n. 14
0
        private void Save()
        {
            if (ErrorCheck())
            {
                if (trntBL.ShowMessage("Q101") == DialogResult.Yes)
                {
                    DataTable dt = new DataTable();
                    dt = trntBL.SimpleSelect1("70", ChangeDate.Replace("/", "-"), StoreCD);
                    if (dt.Rows.Count > 0)
                    {
                        trntBL.ShowMessage("E252");
                    }
                    ddpe = GetDepositEntity();
                    if (trntBL.TempoNyuukinTouroku_D_DepositHistory_InsertUpdate(ddpe))
                    {
                        if (!string.IsNullOrWhiteSpace(txtCustomerCD.Text))
                        {
                            dce = GetDCollectData();
                            trntBL.TempoNyuukinTouroku_D_Collect_Insert(dce);
                        }
                        trntBL.ShowMessage("I101");

                        RunConsole();

                        txtPayment.Clear();
                        txtPayment.Focus();
                        cboDenominationName.SelectedValue = "-1";
                        txtCustomerCD.Clear();
                        lblCustomerName.Text = string.Empty;
                        txtRemarks.Clear();
                        DisplayData();
                        chkAdvanceFlg.Enabled = chkAdvanceFlg.Checked = false;
                    }
                }
                else
                {
                    PreviousCtrl.Focus();
                }
            }
        }
Esempio n. 15
0
        private void F12()
        {
            if (ErrorCheck(12))
            {
                if (tnbnBL.ShowMessage(OperationMode == EOperationMode.DELETE ? "Q102" : "Q101") == DialogResult.Yes)
                {
                    mle = new M_Location_Entity();
                    dse = new D_Stock_Entity();
                    DataTable dtUpdate = new DataTable();
                    dtUpdate.Columns.Add("RackNo");
                    dtUpdate.Columns.Add("StockNo");

                    foreach (DataGridViewRow row in dgvTanaban.Rows)
                    {
                        //bool chk =(bool)row.Cells["colChk"].Value;
                        //if(chk)
                        //{
                        DataRow dtrow = dtUpdate.NewRow();
                        dtrow["RackNo"]  = row.Cells["colRackNo1"].Value.ToString();
                        dtrow["StockNo"] = row.Cells["colStockNo"].Value.ToString();
                        dtUpdate.Rows.Add(dtrow);
                        //}
                    }

                    dse = new D_Stock_Entity
                    {
                        dt1 = dtUpdate,
                    };
                    mle = GetEntity();

                    InsertUpdate(dse, mle);
                }
                else
                {
                    PreviousCtrl.Focus();
                }
            }
        }
        private void F12()
        {
            if (ErrorCheck(12))
            {
                if (mtugsbl.ShowMessage(OperationMode == EOperationMode.DELETE ? "Q102" : "Q101") == DialogResult.Yes)
                {
                    mse = GetShippingEntity();
                    switch (OperationMode)
                    {
                    case EOperationMode.INSERT:
                        InsertUpdate(1);
                        break;

                    case EOperationMode.UPDATE:
                        InsertUpdate(2);
                        break;

                    case EOperationMode.DELETE:
                        if (mse.UsedFlg == "1")
                        {
                            mtugsbl.ShowMessage("E154");
                        }
                        else
                        {
                            Delete();
                        }

                        break;
                    }
                }
                else
                {
                    PreviousCtrl.Focus();
                }
            }
        }
Esempio n. 17
0
        public override void FunctionProcess(string tagID)
        {
            if (tagID == "6")
            {
                //Clear();
                rdo_Toroku.Checked = true;
                rdo_Toroku.Focus();
                Control btnF10 = this.TopLevelControl.Controls.Find("BtnF10", true)[0];
                btnF10.Visible = false;
                dataBind();
                gvShukkaTorikomi.ClearSelection();
                dt.Clear();
            }
            if (tagID == "10")
            {
                gvShukkaTorikomi.ActionType = "F10";
                if (rdo_Sakujo.Checked)
                {
                    txtDenpyouNO.E102Check(false);
                    txtDenpyouNO.E165Check(false, "ShukkaTorikom", txtDenpyouNO, null);
                }
                if (ErrorCheck(PanelDetail))
                {
                    DataGridviewBind();
                }
                gvShukkaTorikomi.ActionType = string.Empty;
            }
            //base.FunctionProcess(tagID);

            if (tagID == "12")
            {
                //HET
                (string, string)Xml         = (string.Empty, string.Empty);
                gvShukkaTorikomi.ActionType = "F10";
                if (rdo_Sakujo.Checked)
                {
                    txtDenpyouNO.E102Check(true);
                    txtDenpyouNO.E165Check(true, "ShukkaTorikom", txtDenpyouNO, null);
                }
                if (ErrorCheck(PanelDetail))             //HET
                {
                    if (rdo_Toroku.Checked)
                    {
                        Xml = ChooseFile();
                    }
                    else
                    {
                        Xml = ChooseFileDelete();
                    }

                    BaseBL bbl = new BaseBL();
                    if (!string.IsNullOrEmpty(Xml.Item1) && !string.IsNullOrEmpty(Xml.Item2))
                    {
                        DataTable         return_DT         = new DataTable();
                        ShukkaTorikomi_BL bl                = new ShukkaTorikomi_BL();
                        string            spname            = string.Empty;
                        string            TorikomiDenpyouNO = txtDenpyouNO.Text;

                        if (rdo_Toroku.Checked)
                        {
                            return_DT = bl.ShukkaTorikomi_CUD("ShukkaTorikomi_Insert", Xml.Item1, Xml.Item2, "ErrorCheck");
                            if (return_DT.Rows.Count > 0)
                            {
                                if (return_DT.Rows[0]["Result"].ToString().Equals("1"))
                                {
                                    if (bbl.ShowMessage("Q206") == DialogResult.Yes)
                                    {
                                        return_DT = bl.ShukkaTorikomi_CUD("ShukkaTorikomi_Insert", Xml.Item1, Xml.Item2, TorikomiDenpyouNO);
                                        if (return_DT.Rows.Count > 0)
                                        {
                                            if (return_DT.Rows[0]["Result"].ToString().Equals("1"))
                                            {
                                                bbl.ShowMessage("I002");
                                            }
                                            rdo_Toroku.Checked = true;
                                            rdo_Toroku.Focus();
                                        }
                                    }
                                    else
                                    {
                                        if (PreviousCtrl != null)
                                        {
                                            PreviousCtrl.Focus();
                                        }
                                    }
                                }
                                else
                                {
                                    bbl.ShowMessage("E276", return_DT.Rows[0]["SEQ"].ToString(), return_DT.Rows[0]["Error1"].ToString(), return_DT.Rows[0]["Error2"].ToString());
                                }
                            }
                        }
                        else
                        {
                            return_DT = bl.ShukkaTorikomi_CUD("NewShukkaTorikomi_Delete", Xml.Item1, Xml.Item2, TorikomiDenpyouNO);
                            if (return_DT.Rows.Count > 0)
                            {
                                if (return_DT.Rows[0]["Result"].ToString().Equals("1"))
                                {
                                    if (bbl.ShowMessage("Q102") == DialogResult.Yes)
                                    {
                                        return_DT = bl.ShukkaTorikomi_CUD("NewShukkaTorikomi_Delete", Xml.Item1, Xml.Item2, TorikomiDenpyouNO);
                                        bbl.ShowMessage("I002");
                                        rdo_Sakujo.Checked = true;
                                        txtDate1.Clear();
                                        txtDate2.Clear();
                                        txtDenpyouNO.Clear();
                                        txtDenpyouNO.Focus();
                                        DataGridviewBind();
                                    }
                                }
                                else
                                {
                                    bbl.ShowMessage("S013");
                                    txtDenpyouNO.Focus();
                                }
                            }
                            else
                            {
                                if (PreviousCtrl != null)
                                {
                                    PreviousCtrl.Focus();
                                }
                            }
                        }
                    }
                }
            }
        }
        public override void FunctionProcess(string tagID)
        {
            if (tagID == "6")
            {
                Clear();
            }
            if (tagID == "10")
            {
                DataTable dt = new DataTable {
                    TableName = "MyTableName"
                };
                dt = Get_Form_Object(string.Empty);
                if (dt.Rows.Count > 0)
                {
                    dt.Columns["TokuisakiCD"].ColumnName     = "得意先CD";
                    dt.Columns["KouritenCD"].ColumnName      = "店舗CD";
                    dt.Columns["TokuisakiName"].ColumnName   = "得意先名";
                    dt.Columns["KouritenName"].ColumnName    = "店舗名";
                    dt.Columns["DenpyouDate"].ColumnName     = "伝票日付";
                    dt.Columns["ShukkaYoteiDate"].ColumnName = "出荷日";
                    dt.Columns["HinbanCD"].ColumnName        = "品番";
                    dt.Columns["ColorRyakuName"].ColumnName  = "カラー";
                    dt.Columns["SizeNO"].ColumnName          = "サイズ";
                    dt.Columns["JANCD"].ColumnName           = "JANコード";
                    dt.Columns["ShukkaSiziSuu"].ColumnName   = "数量";
                    dt.Columns["UriageTanka"].ColumnName     = "単価";
                    dt.Columns["UriageKingaku"].ColumnName   = "金額";
                    //dt.Columns["KouritenJuusho2"].ColumnName = "先方発注№";
                    //dt.Columns["SenpouHacchuuNO"].ColumnName = "出荷指示番号";
                    dt.Columns["SenpouHacchuuNO"].ColumnName         = "先方発注№";
                    dt.Columns["ShukkaSiziNO"].ColumnName            = "出荷指示番号";
                    dt.Columns["ShukkaSiziMeisaiTekiyou"].ColumnName = "備考";

                    string   ProgramID = "ShukkaSiziDataShuturyoku";
                    string   fname     = "出荷指示データ出力";
                    string[] datacol   = { "5", "6" };
                    string[] numcol    = null;

                    ExportCSVExcel list = new ExportCSVExcel();
                    bool           bl   = list.ExcelOutputFile(dt, ProgramID, fname, fname, 16, datacol, numcol);
                    if (bl)
                    {
                        Get_Form_Object("Update");
                        Clear();
                    }

                    //if (!System.IO.Directory.Exists("C:\\Excel"))
                    //    System.IO.Directory.CreateDirectory("C:\\Excel");

                    //SaveFileDialog saveFileDialog1 = new SaveFileDialog();
                    //saveFileDialog1.InitialDirectory = @"C:\Excel\";

                    ////for excel
                    //saveFileDialog1.Filter = "ExcelFile|*.xlsx";
                    //saveFileDialog1.FileName = "出荷指示データ出力.xlsx";
                    //saveFileDialog1.RestoreDirectory = true;
                    //if (saveFileDialog1.ShowDialog() == DialogResult.OK)
                    //{
                    //    ExcelDesignSetting obj = new ExcelDesignSetting();
                    //    obj.FilePath = saveFileDialog1.FileName;
                    //    obj.SheetName = "Sheet1";
                    //    obj.Start_Interior_Column = "A1";
                    //    obj.End_Interior_Column = "P1";
                    //    obj.Interior_Color = Color.FromArgb(255, 192, 0);
                    //    obj.Start_Font_Column = "A1";
                    //    obj.End_Font_Column = "P1";
                    //    obj.Font_Color = Color.Black;
                    //    //For column E,F
                    //    obj.Date_Column = new List<int>();
                    //    obj.Date_Column.Add(5);
                    //    obj.Date_Column.Add(6);
                    //    obj.Date_Format = "YYYY/MM/DD";
                    //    obj.Start_Title_Center_Column = "A1";
                    //    obj.End_Title_Center_Column = "P1";
                    //    bool bl = obj_Export.ExportDataTableToExcel(dt, obj);
                    //    if (bl)
                    //    {
                    //        bbl.ShowMessage("I203");
                    //        Clear();
                    //    }
                    //}
                }
                else if (dt.Rows.Count == 0)
                {
                    bbl.ShowMessage("S013");
                    if (PreviousCtrl != null)
                    {
                        PreviousCtrl.Focus();
                    }
                }
                base.FunctionProcess(tagID);
            }
        }
        public override void FunctionProcess(string tagID)
        {
            if (tagID == "2")
            {
                ChangeMode(Mode.New);
            }
            if (tagID == "3")
            {
                ChangeMode(Mode.Update);
            }
            if (tagID == "4")
            {
                ChangeMode(Mode.Delete);
            }
            if (tagID == "5")
            {
                ChangeMode(Mode.Inquiry);
            }
            if (tagID == "6")
            {
                Mode_Setting();
            }
            if (tagID == "10")
            {
                string Xml = ChooseFile();
                BaseBL bbl = new BaseBL();
                if (!string.IsNullOrEmpty(Xml))
                {
                    TokuisakiBL bl      = new TokuisakiBL();
                    string      chk_val = string.Empty;
                    if (sRadRegister.Checked)
                    {
                        chk_val = "create_Err_Check";
                    }
                    else
                    {
                        chk_val = "delete_Err_Check";
                    }
                    DataTable dt = bl.CSV_M_Tokuisaki_CUD(Xml, chk_val);
                    if (dt.Rows.Count > 0)
                    {
                        if (dt.Rows[0]["Result"].ToString().Equals("1"))
                        {
                            if (bbl.ShowMessage("Q206") != DialogResult.Yes)
                            {
                                if (PreviousCtrl != null)
                                {
                                    PreviousCtrl.Focus();
                                }
                            }
                            else
                            {
                                if (sRadRegister.Checked)
                                {
                                    chk_val = "create_update";
                                }
                                else
                                {
                                    chk_val = "delete";
                                }
                                dt = bl.CSV_M_Tokuisaki_CUD(Xml, chk_val);
                                if (dt.Rows.Count > 0)
                                {
                                    if (dt.Rows[0]["Result"].ToString().Equals("1"))
                                    {
                                        bbl.ShowMessage("I002");
                                        sRadRegister.Checked = true;
                                        sRadDelete.Checked   = false;
                                    }
                                }
                            }
                        }
                        else
                        {
                            bbl.ShowMessage("E276", dt.Rows[0]["SEQ"].ToString(), dt.Rows[0]["Error1"].ToString(), dt.Rows[0]["Error2"].ToString());
                        }
                    }
                }
            }
            if (tagID == "12")
            {
                // if (ErrorCheck(PanelTitle) && ErrorCheck(PanelDetail))
                // {
                DBProcess();
                switch (cboMode.SelectedValue)
                {
                case "1":
                    ChangeMode(Mode.New);
                    break;

                case "2":
                    ChangeMode(Mode.Update);
                    break;

                case "3":
                    ChangeMode(Mode.Delete);
                    break;

                case "4":
                    ChangeMode(Mode.Inquiry);
                    break;
                    // }
                }
            }

            base.FunctionProcess(tagID);
        }
Esempio n. 20
0
        public override void FunctionProcess(string tagID)
        {
            if (tagID == "2")
            {
                ChangeMode(Mode.New);
            }
            if (tagID == "3")
            {
                ChangeMode(Mode.Update);
            }
            if (tagID == "4")
            {
                ChangeMode(Mode.Delete);
            }
            if (tagID == "5")
            {
                ChangeMode(Mode.Inquiry);
            }
            if (tagID == "6")
            {
                UI_ErrorCheck();
                if (cboMode.SelectedValue.Equals("2") || cboMode.SelectedValue.Equals("3") || cboMode.SelectedValue.Equals("4"))
                {
                    txtCopyProduct.Enabled    = false;
                    txtCopyChangeDate.Enabled = false;
                    txtCopyColor.Enabled      = false;  //HET
                    txtCopySize.Enabled       = false;  //HET
                }
            }
            if (tagID == "10")
            {
                string Xml = GetFileData();
                if (!string.IsNullOrEmpty(Xml))
                {
                    ShouhinBL bl      = new ShouhinBL();
                    string    chk_val = string.Empty;
                    if (rdo_Registragion.Checked)
                    {
                        chk_val = "create_Err_Check";
                    }
                    else
                    {
                        chk_val = "delete_Err_Check";
                    }
                    DataTable dt = bl.CSV_M_Shouhin_CUD(Xml, chk_val);
                    if (dt.Rows.Count > 0)
                    {
                        if (dt.Rows[0]["Result"].ToString().Equals("1"))
                        {
                            if (bbl.ShowMessage("Q206") != DialogResult.Yes)
                            {
                                PreviousCtrl.Focus();
                            }
                            else
                            {
                                if (rdo_Registragion.Checked)
                                {
                                    chk_val = "create_update";
                                }
                                else
                                {
                                    chk_val = "delete";
                                }
                                dt = bl.CSV_M_Shouhin_CUD(Xml, chk_val);
                                if (dt.Rows.Count > 0)
                                {
                                    if (dt.Rows[0]["Result"].ToString().Equals("1"))
                                    {
                                        bbl.ShowMessage("I002");
                                        rdo_Registragion.Checked = true;
                                        rdo_Delete.Checked       = false;
                                    }
                                }
                            }
                        }
                        else
                        {
                            bbl.ShowMessage("E276", dt.Rows[0]["SEQ"].ToString(), dt.Rows[0]["Error1"].ToString(), dt.Rows[0]["Error2"].ToString());
                        }
                    }
                }
            }
            if (tagID == "12")
            {
                if (ErrorCheck(PanelTitle) && ErrorCheck(PanelDetail))
                {
                    DBProcess();
                    switch (cboMode.SelectedValue)
                    {
                    case "1":
                        ChangeMode(Mode.New);
                        bbl.ShowMessage("I101");
                        break;

                    case "2":
                        ChangeMode(Mode.Update);
                        bbl.ShowMessage("I101");
                        break;

                    case "3":
                        ChangeMode(Mode.Delete);
                        bbl.ShowMessage("I102");
                        break;

                    case "4":
                        ChangeMode(Mode.Inquiry);
                        break;
                    }
                }
            }
            base.FunctionProcess(tagID);
        }
Esempio n. 21
0
        public override void FunctionProcess(string tagID)
        {
            if (tagID == "6")
            {
                Clear();
            }
            if (tagID == "10")
            {
                DataTable dt = new DataTable {
                    TableName = "JuchuuListTable"
                };
                dt = Get_Form_Object();
                if (dt.Rows.Count > 0)
                {
                    dt.Columns["JuchuuNO"].ColumnName             = "受注番号";
                    dt.Columns["JuchuuDate"].ColumnName           = "受発注日";
                    dt.Columns["StaffName"].ColumnName            = "担当者	";
                    dt.Columns["TokuisakiCD"].ColumnName          = "得意先コード";
                    dt.Columns["TokuisakiRyakuName"].ColumnName   = "得意先名";
                    dt.Columns["KouritenCD"].ColumnName           = "小売店コード";
                    dt.Columns["KouritenRyakuName"].ColumnName    = "小売店";
                    dt.Columns["SenpouHacchuuNO"].ColumnName      = "先方発注番号";
                    dt.Columns["SenpouBusho"].ColumnName          = "先方部署	";
                    dt.Columns["KibouNouki"].ColumnName           = "希望納期";
                    dt.Columns["JuchuuDenpyouTekiyou"].ColumnName = "伝票摘要";
                    dt.Columns["Char1"].ColumnName               = "ブランド";
                    dt.Columns["Exhibition"].ColumnName          = "展示会";
                    dt.Columns["JANCD"].ColumnName               = "JANコード";
                    dt.Columns["HinbanCD"].ColumnName            = "品番"; //TaskNo564 HET
                    dt.Columns["ShouhinName"].ColumnName         = "品名";
                    dt.Columns["ColorRyakuName"].ColumnName      = "カラー";
                    dt.Columns["SizeNO"].ColumnName              = "サイズ";
                    dt.Columns["JuchuuSuu"].ColumnName           = "数量";
                    dt.Columns["UriageTanka"].ColumnName         = "上代	";
                    dt.Columns["HacchuuTanka"].ColumnName        = "下代";
                    dt.Columns["Free"].ColumnName                = "Free";
                    dt.Columns["JuchuuMeisaiTekiyou"].ColumnName = "明細摘要";
                    dt.Columns["SiiresakiCD"].ColumnName         = "発注先";
                    dt.Columns["SiiresakiRyakuName"].ColumnName  = "発注先名";
                    //dt.Columns.Remove("発注先名");           //HET
                    dt.Columns["SoukoName"].ColumnName = "倉庫";

                    string   ProgramID = "JuchuuList";
                    string   fname     = "受注リスト";
                    string[] datacol   = { "2", "10" };
                    string[] numcol    = { "19", "20", "21" };

                    ExportCSVExcel list = new ExportCSVExcel();
                    list.stringCol = new string[1] {
                        "14"
                    };
                    bool bl = list.ExcelOutputFile(dt, ProgramID, fname, fname, 26, datacol, numcol);
                    if (bl)
                    {
                        Clear();
                    }

                    //if (!System.IO.Directory.Exists("C:\\Excel"))
                    //    System.IO.Directory.CreateDirectory("C:\\Excel");

                    //SaveFileDialog saveFileDialog1 = new SaveFileDialog();
                    //saveFileDialog1.InitialDirectory = @"C:\Excel\";


                    ////for excel
                    //saveFileDialog1.Filter = "ExcelFile|*.xlsx";
                    //saveFileDialog1.FileName = "受注リスト.xlsx";
                    //saveFileDialog1.RestoreDirectory = true;
                    //if (saveFileDialog1.ShowDialog() == DialogResult.OK)
                    //{
                    //    ExcelDesignSetting obj = new ExcelDesignSetting();
                    //    obj.FilePath = saveFileDialog1.FileName;
                    //    obj.SheetName = "受注リスト";
                    //    obj.Start_Interior_Column = "A1";
                    //    obj.End_Interior_Column = "Z1";
                    //    obj.Interior_Color = Color.FromArgb(255, 192, 0);
                    //    obj.Start_Font_Column = "A1";
                    //    obj.End_Font_Column = "Z1";
                    //    obj.Font_Color = Color.Black;
                    //    //For column B
                    //    obj.Date_Column = new List<int>();
                    //    obj.Date_Column.Add(2);
                    //    obj.Date_Column.Add(10);
                    //    obj.Date_Format = "YYYY/MM/DD";
                    //    obj.Start_Title_Center_Column = "A1";
                    //    obj.End_Title_Center_Column = "Z1";
                    //    //for column T,U
                    //    //obj.Number_Column = new List<int>();
                    //    //obj.Number_Column.Add(19);
                    //    //obj.Number_Column.Add(20);
                    //    //obj.Number_Column.Add(21);
                    //    //obj.Number_Format = "#,###,###";
                    //    bool bl = obj_Export.ExportDataTableToExcel(dt, obj);
                    //    if (bl)
                    //    {
                    //        bbl.ShowMessage("I203");
                    //        Clear();
                    //    }
                    //}
                }
                else if (dt.Rows.Count == 0)
                {
                    bbl.ShowMessage("S013");
                    if (PreviousCtrl != null)
                    {
                        PreviousCtrl.Focus();
                    }
                }
            }
            base.FunctionProcess(tagID);
        }
 public override void FunctionProcess(string tagID)
 {
     if (tagID == "6")
     {
         Clear();
     }
     if (tagID == "10")
     {
         gvJuchuuTorikomi.ActionType = "F10";
         if (rdo_Delete.Checked == true)
         {
             txtDenpyouNO.E102Check(false);
             txtDenpyouNO.E160Check(false, "JuchuuTorikomi", txtDenpyouNO, null);
             txtDenpyouNO.E265Check(false, "JuchuuTorikomi", txtDenpyouNO);
         }
         if (ErrorCheck(PanelDetail))
         {
             GridviewBind();
         }
         gvJuchuuTorikomi.ActionType = string.Empty;
     }
     if (tagID == "12")
     {
         gvJuchuuTorikomi.ActionType = "F10";
         string spname = string.Empty;
         if (rdo_Delete.Checked)
         {
             txtDenpyouNO.E102Check(true);
             txtDenpyouNO.E160Check(true, "JuchuuTorikomi", txtDenpyouNO, null);
             txtDenpyouNO.E265Check(true, "JuchuuTorikomi", txtDenpyouNO);
         }
         else
         {
             txtDenpyouNO.E102Check(false);
             txtDenpyouNO.E160Check(false, "JuchuuTorikomi", txtDenpyouNO, null);
             txtDenpyouNO.E265Check(false, "JuchuuTorikomi", txtDenpyouNO);
         }
         if (ErrorCheck(PanelDetail))
         {
             if (rdo_Registration.Checked)
             {
                 (string, string)Xml = GetFile();
                 if (!string.IsNullOrEmpty(Xml.Item1) && !string.IsNullOrEmpty(Xml.Item2))
                 {
                     {
                         spname = "JuchuuTorikomi_Insert";
                         DataTable return_BL1 = JBL.JuchuuTorikomi_CUD(spname, Xml.Item1, Xml.Item2, "ErrorCheck");
                         if (return_BL1.Rows.Count > 0)
                         {
                             if (return_BL1.Rows[0]["Result"].ToString().Equals("1"))
                             {
                                 if (bbl.ShowMessage("Q206") != DialogResult.Yes)
                                 {
                                     if (PreviousCtrl != null)
                                     {
                                         PreviousCtrl.Focus();
                                     }
                                 }
                                 else
                                 {
                                     return_BL1 = JBL.JuchuuTorikomi_CUD(spname, Xml.Item1, Xml.Item2, "");
                                     if (return_BL1.Rows.Count > 0)
                                     {
                                         if (return_BL1.Rows[0]["Result"].ToString().Equals("1"))
                                         {
                                             bbl.ShowMessage("I002");
                                             rdo_Registration.Focus();
                                         }
                                     }
                                 }
                             }
                             else
                             {
                                 bbl.ShowMessage("E276", return_BL1.Rows[0]["SEQ"].ToString(), return_BL1.Rows[0]["Error1"].ToString(), return_BL1.Rows[0]["Error2"].ToString());
                             }
                         }
                     }
                 }
             }
             else
             {
                 string DenpyouNO = txtDenpyouNO.Text;
                 gvJuchuuTorikomi.DataSource = dtMain;
                 if (bbl.ShowMessage("Q102") == DialogResult.Yes)
                 {
                     string Xml = string.Empty;
                     spname = "JuchuuTorikomi_Delete";
                     Xml    = cf.DataTableToXml(dtMain);
                     foreach (DataRow dr in dtMain.Rows)
                     {
                         string JuchuuNO = dr["JuchuuNO"].ToString();
                         JEntity.DataKBN    = 1;
                         JEntity.Number     = JuchuuNO;
                         JEntity.ProgramID  = ProgramID;
                         JEntity.PC         = PCID;
                         JEntity.OperatorCD = OperatorCD;
                         DataTable dt1 = new DataTable();
                         dt1 = JBL.D_Exclusive_Lock_Check(JEntity);
                         if (dt1.Rows[0]["MessageID"].ToString().Equals("S004"))
                         {
                             bbl.ShowMessage("S004");
                         }
                     }
                     JEntity.OperatorCD  = base_Entity.OperatorCD;
                     JEntity.ProgramID   = base_Entity.ProgramID;
                     JEntity.PC          = base_Entity.PC;
                     JEntity.OperateMode = "Delete";
                     DataTable return_BL1 = JBL.JuchuuTorikomi_Delete(spname, Xml, DenpyouNO, JEntity);
                     if (return_BL1.Rows.Count > 0)
                     {
                         if (return_BL1.Rows[0]["Result"].ToString().Equals("1"))
                         {
                             bbl.ShowMessage("I002");
                             rdo_Delete.Checked = true;
                             txtDate1.Clear();
                             txtDate2.Clear();
                             txtDenpyouNO.Clear();
                             txtDenpyouNO.Focus();
                             GridviewBind();
                         }
                         else
                         {
                             bbl.ShowMessage("S013");
                             txtDenpyouNO.Focus();
                         }
                     }
                 }
                 else
                 {
                     if (PreviousCtrl != null)
                     {
                         PreviousCtrl.Focus();
                     }
                 }
             }
         }
     }
     base.FunctionProcess(tagID);
 }