public virtual CloudAccountDA.TimesheetMasterDataTable GetData() { this.Adapter.SelectCommand = this.CommandCollection[0]; CloudAccountDA.TimesheetMasterDataTable dataTable = new CloudAccountDA.TimesheetMasterDataTable(); this.Adapter.Fill(dataTable); return(dataTable); }
public virtual CloudAccountDA.TimesheetMasterDataTable UpdateBillValue(int?TimesheetID, bool?Billed, bool?Unbilled) { this.Adapter.SelectCommand = this.CommandCollection[10]; if (TimesheetID.HasValue) { this.Adapter.SelectCommand.Parameters[1].Value = TimesheetID.Value; } else { this.Adapter.SelectCommand.Parameters[1].Value = DBNull.Value; } if (Billed.HasValue) { this.Adapter.SelectCommand.Parameters[2].Value = Billed.Value; } else { this.Adapter.SelectCommand.Parameters[2].Value = DBNull.Value; } if (Unbilled.HasValue) { this.Adapter.SelectCommand.Parameters[3].Value = Unbilled.Value; } else { this.Adapter.SelectCommand.Parameters[3].Value = DBNull.Value; } CloudAccountDA.TimesheetMasterDataTable dataTable = new CloudAccountDA.TimesheetMasterDataTable(); this.Adapter.Fill(dataTable); return(dataTable); }
public virtual CloudAccountDA.TimesheetMasterDataTable GetDataByCompanyIDANDEntryForWithDate(int?CompanyID, string EntryFor, DateTime?TimesheetDate) { this.Adapter.SelectCommand = this.CommandCollection[3]; if (CompanyID.HasValue) { this.Adapter.SelectCommand.Parameters[1].Value = CompanyID.Value; } else { this.Adapter.SelectCommand.Parameters[1].Value = DBNull.Value; } if (EntryFor == null) { this.Adapter.SelectCommand.Parameters[2].Value = DBNull.Value; } else { this.Adapter.SelectCommand.Parameters[2].Value = EntryFor; } if (TimesheetDate.HasValue) { this.Adapter.SelectCommand.Parameters[3].Value = TimesheetDate.Value; } else { this.Adapter.SelectCommand.Parameters[3].Value = DBNull.Value; } CloudAccountDA.TimesheetMasterDataTable dataTable = new CloudAccountDA.TimesheetMasterDataTable(); this.Adapter.Fill(dataTable); return(dataTable); }
private void SetRecord(string timeId) { this.objTimesheetMasterDT = this.objTimesheetMasterBll.GetDataByTimesheetID(int.Parse(timeId)); if (this.objTimesheetMasterDT.Rows.Count <= 0) { return; } this.btnsa.Visible = false; this.btnup.Visible = true; this.hfCompanyID.Value = this.objTimesheetMasterDT.Rows[0]["CompanyID"].ToString(); this.lblTime.Text = this.hfTimesheetID.Value = this.objTimesheetMasterDT.Rows[0]["TimesheetID"].ToString(); this.txtHours.Text = this.objTimesheetMasterDT.Rows[0]["Hours"].ToString(); this.txtNotes.Text = this.objTimesheetMasterDT.Rows[0]["Notes"].ToString(); this.Calendar1.SelectedDate = DateTime.Parse(this.objTimesheetMasterDT.Rows[0]["TimesheetDate"].ToString()); this.Calendar1_OnSelectionChanged((object)null, (EventArgs)null); string str1 = this.objTimesheetMasterDT.Rows[0]["ProjectID"].ToString(); string str2 = this.objTimesheetMasterDT.Rows[0]["TaskID"].ToString(); if (!string.IsNullOrEmpty(str1)) { this.ddlProject.SelectedValue = str1; this.Session["project"] = (object)str1; } if (string.IsNullOrEmpty(str2)) { return; } this.ddlTask.Items.Add(str2); this.ddlTask.SelectedValue = str2; }
public virtual int Fill(CloudAccountDA.TimesheetMasterDataTable dataTable) { this.Adapter.SelectCommand = this.CommandCollection[0]; if (this.ClearBeforeFill) { dataTable.Clear(); } return(this.Adapter.Fill(dataTable)); }
public virtual CloudAccountDA.TimesheetMasterDataTable DeleteByCompanyID(int?CompanyID) { this.Adapter.SelectCommand = this.CommandCollection[1]; if (CompanyID.HasValue) { this.Adapter.SelectCommand.Parameters[1].Value = CompanyID.Value; } else { this.Adapter.SelectCommand.Parameters[1].Value = DBNull.Value; } CloudAccountDA.TimesheetMasterDataTable dataTable = new CloudAccountDA.TimesheetMasterDataTable(); this.Adapter.Fill(dataTable); return(dataTable); }
public virtual CloudAccountDA.TimesheetMasterDataTable GetDataByProjectID(int?ProjectID) { this.Adapter.SelectCommand = this.CommandCollection[6]; if (ProjectID.HasValue) { this.Adapter.SelectCommand.Parameters[1].Value = ProjectID.Value; } else { this.Adapter.SelectCommand.Parameters[1].Value = DBNull.Value; } CloudAccountDA.TimesheetMasterDataTable dataTable = new CloudAccountDA.TimesheetMasterDataTable(); this.Adapter.Fill(dataTable); return(dataTable); }
public virtual CloudAccountDA.TimesheetMasterDataTable GetDataBySearchParameter(int?CompanyID, DateTime?TimesheetDate, int?ProjectID, int?TaskID, string EntryFor) { this.Adapter.SelectCommand = this.CommandCollection[7]; if (CompanyID.HasValue) { this.Adapter.SelectCommand.Parameters[1].Value = CompanyID.Value; } else { this.Adapter.SelectCommand.Parameters[1].Value = DBNull.Value; } if (TimesheetDate.HasValue) { this.Adapter.SelectCommand.Parameters[2].Value = TimesheetDate.Value; } else { this.Adapter.SelectCommand.Parameters[2].Value = DBNull.Value; } if (ProjectID.HasValue) { this.Adapter.SelectCommand.Parameters[3].Value = ProjectID.Value; } else { this.Adapter.SelectCommand.Parameters[3].Value = DBNull.Value; } if (TaskID.HasValue) { this.Adapter.SelectCommand.Parameters[4].Value = TaskID.Value; } else { this.Adapter.SelectCommand.Parameters[4].Value = DBNull.Value; } if (EntryFor == null) { this.Adapter.SelectCommand.Parameters[5].Value = DBNull.Value; } else { this.Adapter.SelectCommand.Parameters[5].Value = EntryFor; } CloudAccountDA.TimesheetMasterDataTable dataTable = new CloudAccountDA.TimesheetMasterDataTable(); this.Adapter.Fill(dataTable); return(dataTable); }
protected void btnUpdate_Click(object sender, EventArgs e) { if (!this.Page.IsValid) { return; } if (!string.IsNullOrEmpty(this.lblTime.Text) && this.ddlProject.SelectedIndex > 0 && this.ddlTask.SelectedIndex > 0) { this.hfTimesheetID.Value = this.lblTime.Text; this.objTimesheetMasterDT = this.objTimesheetMasterBll.GetDataByTimesheetID(int.Parse(this.hfTimesheetID.Value)); string sEntryFor = this.objTimesheetMasterDT.Rows[0]["EntryFor"].ToString(); string sEntryForRole = this.objTimesheetMasterDT.Rows[0]["EntryForRole"].ToString(); string sEntryBy = this.objTimesheetMasterDT.Rows[0]["EntryBy"].ToString(); DateTime dateTime = DateTime.Parse(this.objTimesheetMasterDT.Rows[0]["EntryDate"].ToString()); Decimal? dHours = new Decimal?(); if (this.txtHours.Text.Trim().Length > 0) { dHours = new Decimal?(Decimal.Parse(this.txtHours.Text.Trim())); } if (this.objTimesheetMasterBll.UpdateTimesheet(int.Parse(this.hfTimesheetID.Value), int.Parse(this.hfCompanyID.Value), new DateTime?(this.Calendar1.SelectedDate), int.Parse(this.ddlProject.SelectedItem.Value), int.Parse(this.ddlTask.SelectedItem.Value), dHours, this.txtNotes.Text.Trim(), false, true, sEntryFor, sEntryForRole, sEntryBy, new DateTime?(dateTime))) { this.btnsa.Visible = true; this.btnup.Visible = false; this.Clear(); this.Calendar1.SelectedDate = this.Calendar1.SelectedDate; this.Calendar1_OnSelectionChanged(sender, e); this.BindDropDown(); } else { this.DisplayAlert("Not updated please try after some time"); } } else { this.DisplayAlert("Please Fill All Required Fields..!"); } }
public virtual int Update(CloudAccountDA.TimesheetMasterDataTable dataTable) { return(this.Adapter.Update(dataTable)); }