public bool M_Calendar_Insert_Update(M_Calendar_Entity mce)
        {
            Dictionary <string, ValuePair> dic = new Dictionary <string, ValuePair>
            {
                { "@DayOffXml", new ValuePair {
                      value1 = SqlDbType.VarChar, value2 = mce.DayOffXml
                  } },
                { "@Operator", new ValuePair {
                      value1 = SqlDbType.VarChar, value2 = mce.InsertOperator
                  } },
                { "@Program", new ValuePair {
                      value1 = SqlDbType.VarChar, value2 = mce.ProgramID
                  } },
                { "@PC", new ValuePair {
                      value1 = SqlDbType.VarChar, value2 = mce.PC
                  } },
                { "@OperateMode", new ValuePair {
                      value1 = SqlDbType.VarChar, value2 = mce.ProcessMode
                  } },
                { "@KeyItem", new ValuePair {
                      value1 = SqlDbType.VarChar, value2 = mce.Key
                  } }
            };

            UseTransaction = true;
            return(InsertUpdateDeleteData(dic, "M_Calendar_Update"));
        }
        public DataTable M_Calendar_SelectCalencarDate(M_Calendar_Entity mce)
        {
            Dictionary <string, ValuePair> dic = new Dictionary <string, ValuePair>
            {
                { "@CalendarDate", new ValuePair {
                      value1 = SqlDbType.Date, value2 = mce.CalendarDate
                  } }
            };

            return(SelectData(dic, "M_Calendar_SelectCalencarDate"));
        }
Esempio n. 3
0
 private M_Calendar_Entity GetCalendarEntity()
 {
     mce = new M_Calendar_Entity
     {
         dtDayOff       = dtSetting,
         InsertOperator = InOperatorCD,
         ProgramID      = InProgramID,
         ProcessMode    = "変更",
         Key            = txtMonth.Text,
         PC             = InPcID,
     };
     return(mce);
 }
Esempio n. 4
0
 public void F7()
 {
     if (!string.IsNullOrWhiteSpace(txtMonth.Text))
     {
         CreateDataTable();
         mce = GetCalendarEntity();
         if (mtcbl.M_Calendar_Insert_Update(mce))
         {
             now           = Convert.ToDateTime(txtMonth.Text.ToString() + "/01 00:00:00");
             lblMonth.Text = txtMonth.Text = now.AddMonths(-1).ToString();
             BindGridCalendar(now.AddMonths(-1));
             txtMonth.Focus();
         }
     }
 }
Esempio n. 5
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. 6
0
 public DataTable M_Calendar_SelectCalencarDate(M_Calendar_Entity mce)
 {
     return(mcaldl.M_Calendar_SelectCalencarDate(mce));
 }
 public bool M_Calendar_Insert_Update(M_Calendar_Entity mce)
 {
     mce.DayOffXml = DataTableToXml(mce.dtDayOff);
     return(mcdl.M_Calendar_Insert_Update(mce));
 }
        private bool ErrorCheck()
        {
            if (!string.IsNullOrWhiteSpace(txtRecordFrom.Text))
            {
                M_Calendar_Entity mce = new M_Calendar_Entity();
                //mce.CalendarDate = txtRecordFrom.Text;
                //DataTable dcFrom = new DataTable();
                //dcFrom = kthbl.CalendarSelect(mce);
                //if(dcFrom.Rows.Count > 0)
                //{
                //    txtRecordFrom.Focus();
                //    return false;
                //}

                if (!string.IsNullOrWhiteSpace(txtRecordTo.Text))
                {
                    //mce.CalendarDate = txtRecordTo.Text;
                    //DataTable dcTo = new DataTable();
                    //dcTo = kthbl.CalendarSelect(mce);
                    //if (dcTo.Rows.Count > 0)
                    //{
                    //    txtRecordTo.Focus();
                    //    return false;
                    //}

                    int result = txtRecordFrom.Text.CompareTo(txtRecordTo.Text);
                    if (result > 0)
                    {
                        kthbl.ShowMessage("E104");
                        txtRecordTo.Focus();
                        return(false);
                    }
                }
                if (cboStoreName.SelectedValue.ToString() == "-1")
                {
                    kthbl.ShowMessage("E102");
                    cboStoreName.Focus();
                    return(false);
                }
                //else
                //{
                //    //M_StoreAuthorizations_Entity  mae = new M_StoreAuthorizations_Entity();
                //    //mae.StoreAuthorizationsCD = made.AuthorizationsCD;
                //    //mae.ChangeDate = made.ChangeDate;
                //    //mae.ProgramID = "KeihiltiranHyou";
                //    //mae.StoreCD = InOperatorCD;
                //    //DataTable dtstoreAuto = new DataTable();

                //}

                if (!string.IsNullOrWhiteSpace(txtPaymentTo.Text))
                {
                    int result = txtPaymentFrom.Text.CompareTo(txtPaymentTo.Text);
                    if (result > 0)
                    {
                        kthbl.ShowMessage("E104");
                        txtPaymentTo.Focus();
                        return(false);
                    }
                }
                if (!string.IsNullOrWhiteSpace(txtExpenseTo.Text))
                {
                    int result = txtExpenseFrom.Text.CompareTo(txtExpenseTo.Text);
                    if (result > 0)
                    {
                        kthbl.ShowMessage("E104");
                        txtExpenseTo.Focus();
                        return(false);
                    }
                }
            }

            return(true);
        }