public virtual CloudAccountDA.ContractorProjectDetailDataTable GetData()
 {
     this.Adapter.SelectCommand = this.CommandCollection[0];
     CloudAccountDA.ContractorProjectDetailDataTable dataTable = new CloudAccountDA.ContractorProjectDetailDataTable();
     this.Adapter.Fill(dataTable);
     return(dataTable);
 }
 public virtual int Fill(CloudAccountDA.ContractorProjectDetailDataTable dataTable)
 {
     this.Adapter.SelectCommand = this.CommandCollection[0];
     if (this.ClearBeforeFill)
     {
         dataTable.Clear();
     }
     return(this.Adapter.Fill(dataTable));
 }
 public virtual CloudAccountDA.ContractorProjectDetailDataTable DeleteByProjectID(int?ProjectID)
 {
     this.Adapter.SelectCommand = this.CommandCollection[3];
     if (ProjectID.HasValue)
     {
         this.Adapter.SelectCommand.Parameters[1].Value = ProjectID.Value;
     }
     else
     {
         this.Adapter.SelectCommand.Parameters[1].Value = DBNull.Value;
     }
     CloudAccountDA.ContractorProjectDetailDataTable dataTable = new CloudAccountDA.ContractorProjectDetailDataTable();
     this.Adapter.Fill(dataTable);
     return(dataTable);
 }
Example #4
0
        private void SetRecord(string iD)
        {
            this.objContractorMasterDT = this.objContractorMasterBll.GetDataByContractorID(int.Parse(iD));
            if (this.objContractorMasterDT.Rows.Count <= 0)
            {
                return;
            }
            this.hfContractorID.Value    = this.objContractorMasterDT.Rows[0]["ContractorID"].ToString();
            this.hfCompanyID.Value       = this.objContractorMasterDT.Rows[0]["CompanyID"].ToString();
            this.txtContractorName.Text  = this.objContractorMasterDT.Rows[0]["ContractorName"].ToString();
            this.txtContractorEmail.Text = this.objContractorMasterDT.Rows[0]["ContractorEmail"].ToString();
            this.txtRebillRate.Text      = this.objContractorMasterDT.Rows[0]["RebillRate"].ToString();
            string str1 = this.objContractorMasterDT.Rows[0]["TaskID"].ToString();

            if (!string.IsNullOrEmpty(str1))
            {
                this.ddlTask.SelectedValue = str1;
            }
            this.sqldsProjects.DataBind();
            this.chkProjects.DataBind();
            this.projectsDiv.Visible          = this.chkProjects.Items.Count > 0;
            this.objContractorProjectDetailDT = this.objContractorProjectDetailBll.GetDataByContractorID(int.Parse(this.hfContractorID.Value));
            if (this.objContractorProjectDetailDT.Rows.Count <= 0)
            {
                return;
            }
            for (int index = 0; index < this.objContractorProjectDetailDT.Rows.Count; ++index)
            {
                string str2 = this.objContractorProjectDetailDT.Rows[index]["ProjectID"].ToString();
                foreach (ListItem listItem in this.chkProjects.Items)
                {
                    if (listItem.Value == str2)
                    {
                        listItem.Selected = true;
                        break;
                    }
                }
            }
        }
        private void SetRecord(string iD)
        {
            this.objProjectMasterDT = this.objProjectMasterBll.GetDataByProjectID(int.Parse(iD));
            if (this.objProjectMasterDT.Rows.Count <= 0)
            {
                return;
            }
            this.hfProjectID.Value        = this.objProjectMasterDT.Rows[0]["ProjectID"].ToString();
            this.hfCompanyID.Value        = this.objProjectMasterDT.Rows[0]["CompanyID"].ToString();
            this.txtProjectName.Text      = this.objProjectMasterDT.Rows[0]["ProjectName"].ToString();
            this.txtProjectDesc.Text      = this.objProjectMasterDT.Rows[0]["ProjectDesc"].ToString();
            this.ddlManager.SelectedValue = this.objProjectMasterDT.Rows[0]["ProjectManager"].ToString();
            this.ddlClient.SelectedValue  = this.objProjectMasterDT.Rows[0]["ClientID"].ToString();
            this.chkCanClient.Visible     = this.objProjectMasterDT.Rows[0]["ClientID"].ToString() != "0";
            this.chkCanClient.Checked     = bool.Parse(this.objProjectMasterDT.Rows[0]["CanClient"].ToString());
            this.ddlMethod.SelectedIndex  = this.ddlMethod.Items.IndexOf(this.ddlMethod.Items.FindByText(this.objProjectMasterDT.Rows[0]["BillingMethod"].ToString()));
            this.ddlMethod_SelectedIndexChanged((object)null, (EventArgs)null);
            this.txtFlatAmount.Text   = this.objProjectMasterDT.Rows[0]["FlatAmount"].ToString();
            this.txtProjectRate.Text  = this.objProjectMasterDT.Rows[0]["ProjectRate"].ToString();
            this.txtTimeEstimate.Text = this.objProjectMasterDT.Rows[0]["TimeEstimate"].ToString();
            bool flag = bool.Parse(this.objProjectMasterDT.Rows[0]["CompanyTeam"].ToString());

            this.gvUsers.DataBind();
            this.gvTask.DataBind();
            if (this.gvUsers.Rows.Count > 0 && flag)
            {
                for (int index = 0; index < this.gvUsers.Rows.Count; ++index)
                {
                    CheckBox checkBox = (CheckBox)this.gvUsers.Rows[index].Cells[0].FindControl("chkUserID");
                    if (checkBox.CssClass == "Admin")
                    {
                        checkBox.Checked = true;
                        break;
                    }
                }
            }
            this.objStaffProjectDetailDT = this.objStaffProjectDetailBll.GetDataByProjectID(int.Parse(this.hfProjectID.Value));
            if (this.objStaffProjectDetailDT.Rows.Count > 0)
            {
                for (int index1 = 0; index1 < this.objStaffProjectDetailDT.Rows.Count; ++index1)
                {
                    for (int index2 = 0; index2 < this.gvUsers.Rows.Count; ++index2)
                    {
                        CheckBox checkBox = (CheckBox)this.gvUsers.Rows[index2].Cells[0].FindControl("chkUserID");
                        if (checkBox.CssClass == "Staff" && checkBox.ToolTip == this.objStaffProjectDetailDT.Rows[index1]["StaffID"].ToString())
                        {
                            checkBox.Checked = true;
                            break;
                        }
                    }
                }
            }
            this.objContractorProjectDetailDT = this.objContractorProjectDetailBll.GetDataByProjectID(int.Parse(this.hfProjectID.Value));
            if (this.objContractorProjectDetailDT.Rows.Count > 0)
            {
                for (int index1 = 0; index1 < this.objContractorProjectDetailDT.Rows.Count; ++index1)
                {
                    for (int index2 = 0; index2 < this.gvUsers.Rows.Count; ++index2)
                    {
                        CheckBox checkBox = (CheckBox)this.gvUsers.Rows[index2].Cells[0].FindControl("chkUserID");
                        if (checkBox.CssClass == "Contractor" && checkBox.ToolTip == this.objContractorProjectDetailDT.Rows[index1]["ContractorID"].ToString())
                        {
                            checkBox.Checked = true;
                        }
                    }
                }
            }
            this.objProjectTaskDetailDT = this.objProjectTaskDetailBll.GetDataByProjectID(int.Parse(this.hfProjectID.Value));
            if (this.objProjectTaskDetailDT.Rows.Count <= 0)
            {
                return;
            }
            for (int index = 0; index < this.objProjectTaskDetailDT.Rows.Count; ++index)
            {
                CheckBox checkBox = (CheckBox)this.gvTask.Rows[index].Cells[0].FindControl("chkTaskID");
                if (checkBox.ToolTip == this.objProjectTaskDetailDT.Rows[index]["TaskID"].ToString())
                {
                    checkBox.Checked = true;
                }
            }
        }
 public virtual int Update(CloudAccountDA.ContractorProjectDetailDataTable dataTable)
 {
     return(this.Adapter.Update(dataTable));
 }