Ejemplo n.º 1
0
        private void ChangeMode(EOperationMode OperationMode)
        {
            base.OperationMode = OperationMode;
            switch (OperationMode)
            {
            case EOperationMode.INSERT:
                Clear(PanelHeader);
                Clear(panelDetail);
                EnablePanel(PanelHeader);
                //DisablePanel(panelDetail);
                EnablePanel(panelDetail);
                Sc_Item.SearchEnable = true;
                F9Visible            = true;
                F11Display.Enabled   = F11Enable = true;
                break;

            case EOperationMode.UPDATE:
            case EOperationMode.DELETE:
            case EOperationMode.SHOW:
                Clear(PanelHeader);
                Clear(panelDetail);
                EnablePanel(PanelHeader);
                DisablePanel(panelDetail);
                Sc_Item.SearchEnable = true;
                F9Visible            = true;
                F12Enable            = false;
                F11Display.Enabled   = F11Enable = true;
                break;
            }
            Sc_Item.SetFocus(1);
        }
Ejemplo n.º 2
0
        public override void FunctionProcess(int Index)
        {
            CKM_SearchControl sc = new CKM_SearchControl();

            switch (Index + 1)
            {
            case 2:
                ChangeMode(EOperationMode.INSERT);
                break;

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

            case 4:
            case 5:
                break;

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

            case 11:
                F11();
                break;

            case 12:
                F12();
                break;
            }
        }
Ejemplo n.º 3
0
 private void MasterTouroku_SKUCDHenkou_SKUCD変更_Load(object sender, EventArgs e)
 {
     InProgramID = "MasterTouroku_SKUCDHenkou_SKUCD変更";
     SetFunctionLabel(EProMode.MENTE);
     StartProgram();
     Sc_Item.SetFocus(1);
     F4Visible  = false;
     F5Visible  = false;
     F7Visible  = false;
     F8Visible  = false;
     F10Visible = false;
 }
Ejemplo n.º 4
0
        public bool ErrorCheck()
        {
            if (cboWarehouse.SelectedValue.ToString() == "-1")
            {
                skskbl.ShowMessage("E102");
                cboWarehouse.Focus();
                return(false);
            }
            else
            {
                //mse.DeleteFlg = "0";
                //DataTable dtsouko = new DataTable();
                //dtsouko = nkskbl.D_Souko_Select(mse);
                //if (dtsouko.Rows.Count == 0)
                //{
                //    nkskbl.ShowMessage("E128");
                //    cboWarehouse.Focus();
                //    return false;
                //}
            }

            if (!string.IsNullOrWhiteSpace(txtShippingEndDate.Text))
            {
                int result = txtShippingStartDate.Text.CompareTo(txtShippingEndDate.Text);
                if (result > 0)
                {
                    skskbl.ShowMessage("E104");
                    txtShippingEndDate.Focus();
                    return(false);
                }
            }

            if (!chkShipmentOfSale.Checked && !chkShipmentOfTransfer.Checked)
            {
                skskbl.ShowMessage("E111");
                chkShipmentOfSale.Focus();
                return(false);
            }

            if (!string.IsNullOrWhiteSpace(SC_Order.TxtCode.Text))
            {
                dje.JuchuuNO = SC_Order.TxtCode.Text;
                DataTable dtJuChuu = new DataTable();
                dtJuChuu = skskbl.D_Juchuu_DataSelect_ForShukkaShoukai(dje);
                if (dtJuChuu.Rows.Count == 0)
                {
                    skskbl.ShowMessage("E138");
                    SC_Order.Focus();
                    return(false);
                }
                else
                {
                    if (!string.IsNullOrWhiteSpace(dtJuChuu.Rows[0]["DeleteDateTime"].ToString()))
                    {
                        skskbl.ShowMessage("E140");
                        SC_Order.Focus();
                        return(false);
                    }
                    else
                    {
                        msae.StoreCD = dtJuChuu.Rows[0]["StoreCD"].ToString();
                        msae.StoreAuthorizationsCD = StoreAuthorizationsCD;
                        msae.ChangeDate            = StoreAuthorizationsChangeDate;
                        //msae.ProgramID = "0";
                        DataTable dtAuthorization = new DataTable();
                        dtAuthorization = skskbl.M_StoreAuthorizations_Select(msae);
                        if (dtAuthorization.Rows.Count == 0)
                        {
                            skskbl.ShowMessage("E139");
                            SC_Order.Focus();
                            return(false);
                        }
                    }
                }
            }


            if (!chkAlready.Checked && !chkNot.Checked)
            {
                skskbl.ShowMessage("E111");
                chkAlready.Focus();
                return(false);
            }

            if (!string.IsNullOrWhiteSpace(Sc_Item.TxtCode.Text))
            {
                if (Sc_Item.TxtCode.Text.Contains(","))
                {
                    string   a   = Sc_Item.TxtCode.Text;
                    string[] arr = a.Split(',');
                    if (arr.Length >= 10)
                    {
                        skskbl.ShowMessage("E187");
                        Sc_Item.SetFocus(1);
                        return(false);
                    }
                }
            }

            if (!string.IsNullOrWhiteSpace(Sc_SKUCD.TxtCode.Text))
            {
                if (Sc_SKUCD.TxtCode.Text.Contains(","))
                {
                    string   a   = Sc_SKUCD.TxtCode.Text;
                    string[] arr = a.Split(',');
                    if (arr.Length >= 10)
                    {
                        skskbl.ShowMessage("E187");
                        Sc_SKUCD.SetFocus(1);
                        return(false);
                    }
                }
            }

            if (!string.IsNullOrWhiteSpace(SC_JanCD.TxtCode.Text))
            {
                if (SC_JanCD.TxtCode.Text.Contains(","))
                {
                    string   a   = SC_JanCD.TxtCode.Text;
                    string[] arr = a.Split(',');
                    if (arr.Length >= 10)
                    {
                        skskbl.ShowMessage("E187");
                        SC_JanCD.SetFocus(1);
                        return(false);
                    }
                }
            }
            return(true);
        }
Ejemplo n.º 5
0
        private bool ErrorCheck(int index)
        {
            if (index == 11)
            {
                if (RequireCheck(new Control[] { Sc_Item.TxtCode }))
                {
                    return(false);
                }

                if (string.IsNullOrWhiteSpace(txtDate1.Text))
                {
                    mskubl.ShowMessage("E102");
                    txtDate1.Focus();
                    return(false);
                }

                if (OperationMode == EOperationMode.INSERT)
                {
                    if (type == 1)
                    {
                        mie.ITemCD     = Sc_Item.TxtCode.Text;
                        mie.ChangeDate = txtDate1.Text;
                        DataTable dtitem = new DataTable();
                        dtitem = mskubl.M_ITEM_NormalSelect(mie);
                        if (dtitem.Rows.Count > 0)
                        {
                            mskubl.ShowMessage("E132");
                            Sc_Item.SetFocus(1);
                            return(false);
                        }
                    }
                    else if (type == 2)
                    {
                        if (string.IsNullOrWhiteSpace(txtRevDate.Text))
                        {
                            mskubl.ShowMessage("E102");
                            txtRevDate.Focus();
                            return(false);
                        }

                        mie.ITemCD     = Sc_Item.TxtCode.Text;
                        mie.ChangeDate = txtRevDate.Text;
                        DataTable dtitem = new DataTable();
                        dtitem = mskubl.M_ITEM_NormalSelect(mie);
                        if (dtitem.Rows.Count == 0)
                        {
                            mskubl.ShowMessage("E133");
                            Sc_Item.SetFocus(1);
                            return(false);
                        }
                    }
                }
                if (OperationMode == EOperationMode.UPDATE)
                {
                    mie.ITemCD     = Sc_Item.TxtCode.Text;
                    mie.ChangeDate = txtDate1.Text;
                    DataTable dtitem = new DataTable();
                    dtitem = mskubl.M_ITEM_NormalSelect(mie);
                    if (dtitem.Rows.Count == 0)
                    {
                        mskubl.ShowMessage("E133");
                        Sc_Item.SetFocus(1);
                        return(false);
                    }
                }
            }
            else if (index == 12)
            {
                //string[] b = new string[] { };
                //ArrayList myArryList = new ArrayList();
                #region Size
                string[] sizeArray   = new string[10];
                int[]    sizemissing = new int[10];
                for (int i = 0; i < 10; i++)
                {
                    var sizeNewtxtbox_ = Controls.Find("txtnewsize" + (i + 1).ToString(), true)[0] as CKM_TextBox;
                    var sizeOldtxtbox_ = Controls.Find("txtoldsize" + (i + 1).ToString(), true)[0] as CKM_TextBox;
                    var sizeCheckbox_  = Controls.Find("SizeDelChk" + (i + 1).ToString(), true)[0] as CKM_CheckBox;
                    /// doooooooooo
                    ///
                    if (!string.IsNullOrWhiteSpace(sizeOldtxtbox_.Text))
                    {
                        if (string.IsNullOrWhiteSpace(sizeNewtxtbox_.Text))
                        {
                            mskubl.ShowMessage("E102");
                            sizeNewtxtbox_.Focus();
                            return(false);
                        }
                    }
                    sizeArray[i] = sizeNewtxtbox_.Text;
                    if (!string.IsNullOrWhiteSpace(sizeNewtxtbox_.Text))
                    {
                        sizemissing[i] = Convert.ToInt32(sizeNewtxtbox_.Text);
                    }

                    if (sizeCheckbox_.Checked)
                    {
                        max = int.Parse(sizeNewtxtbox_.Text);
                    }
                }
                if (SelectCheck(sizemissing))
                {
                    mskubl.ShowMessage("E229");
                    txtnewsize10.Focus();
                    return(false);
                }

                if (HasDuplicates(sizeArray))
                {
                    mskubl.ShowMessage("E105");
                    txtnewsize10.Focus();
                    return(false);
                }

                int misssize = getMissingNo(sizemissing, 10);
                if ((misssize > 0 && misssize < 11) || (misssize < 0))
                {
                    mskubl.ShowMessage("E228");
                    txtnewsize10.Focus();
                    return(false);
                }
                #endregion

                #region Color
                string[] colorArray   = new string[20];
                int[]    colormissing = new int[20];
                for (int i = 0; i < 20; i++)
                {
                    var colorNewtxtbox_ = Controls.Find("txtnewcolor" + (i + 1).ToString(), true)[0] as CKM_TextBox;
                    var colorOldtxtbox_ = Controls.Find("txtoldcolor" + (i + 1).ToString(), true)[0] as CKM_TextBox;
                    var colorCheckbox_  = Controls.Find("ColorDelChk" + (i + 1).ToString(), true)[0] as CKM_CheckBox;

                    if (!string.IsNullOrWhiteSpace(colorOldtxtbox_.Text))
                    {
                        if (string.IsNullOrWhiteSpace(colorNewtxtbox_.Text))
                        {
                            mskubl.ShowMessage("E102");
                            colorNewtxtbox_.Focus();
                            return(false);
                        }
                    }
                    colorArray[i] = colorNewtxtbox_.Text;
                    if (!string.IsNullOrWhiteSpace(colorNewtxtbox_.Text))
                    {
                        sizemissing[i] = Convert.ToInt32(colorNewtxtbox_.Text);
                    }

                    if (colorCheckbox_.Checked)
                    {
                        max = int.Parse(colorCheckbox_.Text);
                    }
                }

                if (SelectCheck(sizemissing))
                {
                    mskubl.ShowMessage("E229");
                    txtnewcolor10.Focus();
                    return(false);
                }

                if (HasDuplicates(colorArray))
                {
                    mskubl.ShowMessage("E105");
                    txtnewsize10.Focus();
                    return(false);
                }

                int misscolor = getMissingNo(sizemissing, 20);
                if ((misscolor > 0 && misscolor < 11) || (misscolor < 0))
                {
                    mskubl.ShowMessage("E228");
                    txtnewsize10.Focus();
                    return(false);
                }
                #endregion
            }

            return(true);
        }