Exemplo n.º 1
0
 protected void btnSave_Click(object sender, EventArgs e)
 {
     using (WeekYear objWeekYear = new WeekYear())
     {
         objWeekYear.WeekName       = txtWeekName.Text;
         objWeekYear.WeekNumber     = Convert.ToInt16(ddlWeekNunmber.SelectedValue.ToString());
         objWeekYear.DateStart      = Convert.ToDateTime(dtpFrom.SelectedDate.ToString());
         objWeekYear.DateTo         = Convert.ToDateTime(dtpTo.SelectedDate.ToString());
         objWeekYear.FiscalYearCode = Convert.ToInt16(ddlFiscalYear.SelectedValue);
         objWeekYear.CreatedBy      = Request.Cookies["Speedo"]["UserName"].ToString();
         objWeekYear.ModifiedBy     = Request.Cookies["Speedo"]["UserName"].ToString();
         if (objWeekYear.Insert() > 0)
         {
             Response.Redirect("JournalWeeks.aspx");
         }
     }
 }