Example #1
0
    void InsertTimeHist()
    {
        var t = new tblTimeExpensesSummary_history();

        t.Comments = txtComments.Text == string.Empty ? "No Comments" : txtComments.Text;
        if (!String.IsNullOrEmpty(lstCalendar.SelectedValue))
        {
            t.Date = DateTime.Parse(lstCalendar.SelectedValue);
        }
        else
        {
            t.Date = DateTime.Parse(string.Format("{0:dddd, MMMM d, yyyy}", DateTime.Today.ToString()));
        }
        t.Expenses        = null;
        t.LastUpdated     = null;
        t.PaymentReceived = false;
        t.pictureUrl      = null;
        t.CreatedDate     = DateTime.Now;
        t.Location        = ddlAddLocation.SelectedValue.ToString();
        t.WorkDescription = ddlWorkDesc.SelectedValue.ToString();
        if (ddlHoursSelect.SelectedIndex > -1)
        {
            t.WorkHrs = Decimal.Parse(ddlHoursSelect.SelectedValue);
        }
        int nUserId = BusLogic.SelectUserId(Application["UserId"].ToString());

        if (nUserId != 0)
        {
            t.Id = nUserId;
        }
        if (!String.IsNullOrEmpty(Request.QueryString["enum"].ToString()))
        {
            t.NewId = Guid.Parse(Request.QueryString["enum"].ToString());
        }
        TNEDB.tblTimeExpensesSummary_histories.InsertOnSubmit(t);
        TNEDB.SubmitChanges();
    }
Example #2
0
 private void detach_tblTimeExpensesSummary_histories(tblTimeExpensesSummary_history entity)
 {
     this.SendPropertyChanging();
     entity.tblTimeExpensesSummary = null;
 }
Example #3
0
 partial void DeletetblTimeExpensesSummary_history(tblTimeExpensesSummary_history instance);
Example #4
0
 partial void InserttblTimeExpensesSummary_history(tblTimeExpensesSummary_history instance);