Exemplo n.º 1
0
        private void F12()
        {
            if (ErrorCheck(12))
            {
                if (mtrbl.ShowMessage(OperationMode == EOperationMode.DELETE ? "Q102" : "Q101") == DialogResult.Yes)
                {
                    mre = GetRenbanEnity();
                    switch (OperationMode)
                    {
                    case EOperationMode.INSERT:
                        InsertUpdate(1);
                        break;

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

                    case EOperationMode.DELETE:
                        Delete();
                        break;
                    }
                }
                else
                {
                    txtContinuous.Focus();
                }
            }
        }
Exemplo n.º 2
0
        public bool M_Renban_Delete(M_Renban_Entity mre)
        {
            Dictionary <string, ValuePair> dic = new Dictionary <string, ValuePair>()
            {
                { "@PrefixValue", new ValuePair {
                      value1 = SqlDbType.VarChar, value2 = mre.PrefixValue
                  } },
                { "@Continuous", new ValuePair {
                      value1 = SqlDbType.VarChar, value2 = mre.Continuous
                  } },
                { "@Operator", new ValuePair {
                      value1 = SqlDbType.VarChar, value2 = mre.Operator
                  } },
                { "@Program", new ValuePair {
                      value1 = SqlDbType.VarChar, value2 = mre.ProgramID
                  } },
                { "@PC", new ValuePair {
                      value1 = SqlDbType.VarChar, value2 = mre.PC
                  } },
                { "@OperateMode", new ValuePair {
                      value1 = SqlDbType.VarChar, value2 = mre.ProcessMode
                  } },
                { "@KeyItem", new ValuePair {
                      value1 = SqlDbType.VarChar, value2 = mre.Key
                  } }
            };

            return(InsertUpdateDeleteData(dic, "M_Renban_Delete"));
        }
Exemplo n.º 3
0
        public DataTable M_Renban_Select(M_Renban_Entity mre)
        {
            Dictionary <string, ValuePair> dic = new Dictionary <string, ValuePair>()
            {
                { "@PrefixValue", new ValuePair {
                      value1 = SqlDbType.VarChar, value2 = mre.PrefixValue
                  } }
            };

            return(SelectData(dic, "M_Renban_Select"));
        }
Exemplo n.º 4
0
        public M_Renban_Entity M_Renban_Select(M_Renban_Entity mre)
        {
            DataTable dtRenban = mrdl.M_Renban_Select(mre);

            if (dtRenban.Rows.Count > 0)
            {
                mre.PrefixValue = dtRenban.Rows[0]["Prefix"].ToString();
                mre.Continuous  = dtRenban.Rows[0]["SeqNumber"].ToString();
                return(mre);
            }
            return(null);
        }
Exemplo n.º 5
0
 private M_Renban_Entity GetRenbanEnity()
 {
     mre = new M_Renban_Entity
     {
         PrefixValue = txtPrefixValue.Text,
         Continuous  = txtContinuous.Text,
         Operator    = InOperatorCD,
         ProcessMode = ModeText,
         ProgramID   = InProgramID,
         PC          = InPcID,
         Key         = txtPrefixValue.Text + " " + txtContinuous.Text
     };
     return(mre);
 }
Exemplo n.º 6
0
        private bool DisplayDataInsert(string prefix)
        {
            mre = new M_Renban_Entity()
            {
                PrefixValue = txtPrefixValue.Text
            };

            mre = mtrbl.M_Renban_Select(mre);

            if (mre != null)
            {
                txtPrefixValue.Text = mre.PrefixValue;
                txtContinuous.Text  = mre.Continuous;
                txtPrefixValue.Focus();
                return(true);
            }
            else
            {
                txtContinuous.Focus();
                return(false);
            }
        }
Exemplo n.º 7
0
 public bool M_Renban_Delete(M_Renban_Entity mre)
 {
     return(mrdl.M_Renban_Delete(mre));
 }
Exemplo n.º 8
0
 public bool M_Renban_Insert_Update(M_Renban_Entity mre, int mode)
 {
     return(mrdl.M_Renban_Insert_Update(mre, mode));
 }