Example #1
0
 public static void DeleteDueDate(DueDateProp dueDateProp)
 {
     using (IDbConnection connection = new SqlConnection(ConfigurationManager.ConnectionStrings["cn"].ConnectionString))
     {
         connection.Open();
         connection.Execute("DeleteDueDate", new { DueDate_ID = dueDateProp.DueDate_ID }, commandType: CommandType.StoredProcedure);
     }
 }
Example #2
0
 private void SpawnDueDateUserControl()
 {
     Data.DueDateProp dueDateProp = new Data.DueDateProp();
     dueDateProp.Card_ID          = cardProp.Card_ID;
     dueDateProp.DueDate_Checked  = false;
     dueDateProp.DueDate_DateTime = DateTime.Now;
     dueDateProp.DueDate_Reminder = 0;
     Data.DataService.InsertDueDate(dueDateProp);
     LoadDueDate();
 }
Example #3
0
 public static void InsertDueDate(DueDateProp duedateProp)
 {
     using (IDbConnection connection = new SqlConnection(ConfigurationManager.ConnectionStrings["cn"].ConnectionString))
     {
         connection.Open();
         DynamicParameters dp = new DynamicParameters();
         dp.AddDynamicParams(new
         {
             Card_ID          = duedateProp.Card_ID,
             DueDate_DateTime = duedateProp.DueDate_DateTime,
             DueDate_Reminder = duedateProp.DueDate_Reminder,
             DueDate_Checked  = duedateProp.DueDate_Checked
         });
         connection.Execute("InsertDueDate", dp, commandType: CommandType.StoredProcedure);
     }
 }
Example #4
0
        private void SpawnDueDateUserControl(Data.DueDateProp ddProp)
        {
            DueDateUserControl dueDateUserControl = new DueDateUserControl();

            dueDateUserControl.AutoSize          = true;
            dueDateUserControl.AutoSizeMode      = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
            dueDateUserControl.BackColor         = System.Drawing.Color.MediumPurple;
            dueDateUserControl.Location          = new System.Drawing.Point(5, 5);
            dueDateUserControl.Margin            = new System.Windows.Forms.Padding(5);
            dueDateUserControl.Name              = "dueDateUserControl";
            dueDateUserControl.Size              = new System.Drawing.Size(690, 126);
            dueDateUserControl.TabIndex          = 2;
            dueDateUserControl.DueDateDeleted   += DueDateUserControl_DueDateDeleted;
            dueDateUserControl.ShowNotification += OnShowNotification;
            dueDateUserControl.LoadData(ddProp);
            dueDatePanel.Controls.Add(dueDateUserControl);
        }