示例#1
0
 public virtual CloudAccountDA.ContractorMasterDataTable GetData()
 {
     this.Adapter.SelectCommand = this.CommandCollection[0];
     CloudAccountDA.ContractorMasterDataTable dataTable = new CloudAccountDA.ContractorMasterDataTable();
     this.Adapter.Fill(dataTable);
     return(dataTable);
 }
 protected void txtEmail_OnTextChanged(object sender, EventArgs e)
 {
     this.objCompanyClientContactDetailDT = this.objCompanyClientContactDetailBll.GetDataByCompanyEmail(int.Parse(this.hfCompanyID.Value), this.txtEmail.Text.Trim());
     this.objStaffMasterDT      = this.objStaffMasterBll.GetDataByCompanyEmail(int.Parse(this.hfCompanyID.Value), this.txtEmail.Text.Trim());
     this.objContractorMasterDT = this.objContractorMasterBll.GetDataByCompanyEmail(int.Parse(this.hfCompanyID.Value), this.txtEmail.Text.Trim());
     if (this.objCompanyClientContactDetailDT.Rows.Count > 0)
     {
         ScriptManager.RegisterClientScriptBlock(sender as Control, this.GetType(), "alert", "alert('Email Already Register With System To Some Client.')", true);
         this.txtEmail.Text = "";
         this.txtEmail.Focus();
     }
     else if (this.objStaffMasterDT.Rows.Count > 0)
     {
         ScriptManager.RegisterClientScriptBlock(sender as Control, this.GetType(), "alert", "alert('Email Already Register With System To Some Staff.')", true);
         this.txtEmail.Text = "";
         this.txtEmail.Focus();
     }
     else if (this.objContractorMasterDT.Rows.Count > 0)
     {
         ScriptManager.RegisterClientScriptBlock(sender as Control, this.GetType(), "alert", "alert('Email Already Register With System To Some Contractor.')", true);
         this.txtEmail.Text = "";
         this.txtEmail.Focus();
     }
     else
     {
         this.txtFirstName.Focus();
     }
 }
示例#3
0
 public virtual CloudAccountDA.ContractorMasterDataTable UpdateWhenDelete(int?ContractorID, bool?Active, bool?Deleted)
 {
     this.Adapter.SelectCommand = this.CommandCollection[6];
     if (ContractorID.HasValue)
     {
         this.Adapter.SelectCommand.Parameters[1].Value = ContractorID.Value;
     }
     else
     {
         this.Adapter.SelectCommand.Parameters[1].Value = DBNull.Value;
     }
     if (Active.HasValue)
     {
         this.Adapter.SelectCommand.Parameters[2].Value = Active.Value;
     }
     else
     {
         this.Adapter.SelectCommand.Parameters[2].Value = DBNull.Value;
     }
     if (Deleted.HasValue)
     {
         this.Adapter.SelectCommand.Parameters[3].Value = Deleted.Value;
     }
     else
     {
         this.Adapter.SelectCommand.Parameters[3].Value = DBNull.Value;
     }
     CloudAccountDA.ContractorMasterDataTable dataTable = new CloudAccountDA.ContractorMasterDataTable();
     this.Adapter.Fill(dataTable);
     return(dataTable);
 }
示例#4
0
 public virtual int Fill(CloudAccountDA.ContractorMasterDataTable dataTable)
 {
     this.Adapter.SelectCommand = this.CommandCollection[0];
     if (this.ClearBeforeFill)
     {
         dataTable.Clear();
     }
     return(this.Adapter.Fill(dataTable));
 }
示例#5
0
 private bool CheckEmail(string email)
 {
     this.objCompanyClientContactDetailDT = this.objCompanyClientContactDetailBll.GetDataByCompanyEmail(int.Parse(this.hfCompanyID.Value), email.Trim());
     this.objCompanyClientMasterDT        = this.objCompanyClientMasterBll.GetDataByCompanyEmail(int.Parse(this.hfCompanyID.Value), email.Trim());
     this.objStaffMasterDT      = this.objStaffMasterBll.GetDataByCompanyEmail(int.Parse(this.hfCompanyID.Value), email.Trim());
     this.objContractorMasterDT = this.objContractorMasterBll.GetDataByCompanyEmail(int.Parse(this.hfCompanyID.Value), email.Trim());
     this.objCompanyMasterDT    = this.objCompanyMasterBll.GetDataByCompanyEmail(email.Trim());
     if (this.objCompanyMasterDT.Rows.Count > 0)
     {
         return(this.hfCompanyID.Value == this.objCompanyMasterDT.Rows[0]["CompanyID"].ToString() ? true : true);
     }
     return(this.objCompanyClientMasterDT.Rows.Count > 0 || this.objCompanyClientContactDetailDT.Rows.Count > 0 || (this.objStaffMasterDT.Rows.Count > 0 || this.objContractorMasterDT.Rows.Count > 0));
 }
示例#6
0
 public virtual CloudAccountDA.ContractorMasterDataTable 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.ContractorMasterDataTable dataTable = new CloudAccountDA.ContractorMasterDataTable();
     this.Adapter.Fill(dataTable);
     return(dataTable);
 }
示例#7
0
        private void ViewRecord(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.lblContractorName1.Text = this.lblContractorName.Text = this.objContractorMasterDT.Rows[0]["ContractorName"].ToString();
            this.lblContractorEmail.Text = this.objContractorMasterDT.Rows[0]["ContractorEmail"].ToString();
            this.lblRebillRate.Text      = this.objContractorMasterDT.Rows[0]["RebillRate"].ToString();
            string s = this.objContractorMasterDT.Rows[0]["TaskID"].ToString();

            if (string.IsNullOrEmpty(s))
            {
                return;
            }
            this.objTaskMasterDT = this.objTaskMasterBll.GetDataByTaskID(int.Parse(s));
            this.lblTask.Text    = this.objTaskMasterDT.Rows[0]["TaskName"].ToString();
        }
示例#8
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;
                    }
                }
            }
        }
示例#9
0
 public virtual CloudAccountDA.ContractorMasterDataTable GetDataByCompanyIDAndEmail(int?CompanyID, string Email)
 {
     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 (Email == null)
     {
         this.Adapter.SelectCommand.Parameters[2].Value = DBNull.Value;
     }
     else
     {
         this.Adapter.SelectCommand.Parameters[2].Value = Email;
     }
     CloudAccountDA.ContractorMasterDataTable dataTable = new CloudAccountDA.ContractorMasterDataTable();
     this.Adapter.Fill(dataTable);
     return(dataTable);
 }
示例#10
0
 public virtual int Update(CloudAccountDA.ContractorMasterDataTable dataTable)
 {
     return(this.Adapter.Update(dataTable));
 }