private void Loaddata(string LeadID) { SqlParameter[] param = new SqlParameter[1]; param[0] = new SqlParameter("@LeadID", SqlDbType.NVarChar); param[0].Value = LeadID; DataTable dt = new DataTable(); dt = DataAccessor.ExecuteQueryDataTable(@" select * from [LeadMaster] where LeadID =@LeadID", param); if (dt.Rows.Count > 0) { // txtProductName.Text= dt.Rows[0]["ProductCode"].ToString(); ddlSource.SelectedValue = dt.Rows[0]["SourceID"].ToString(); txtDomainName.Text = dt.Rows[0]["DomainName"].ToString(); txtDomainDate.Text = dt.Rows[0]["DomainCreatedDate"].ToString(); txtComapanyName.Text = dt.Rows[0]["ComapanyName"].ToString(); txtMobile.Text = dt.Rows[0]["Mobile"].ToString(); txtEmailID.Text = dt.Rows[0]["EmailID"].ToString(); txtLandline.Text = dt.Rows[0]["Landline"].ToString(); txtAddress.Text = dt.Rows[0]["Address"].ToString(); txtCity.Text = dt.Rows[0]["City"].ToString(); txtState.Text = dt.Rows[0]["State"].ToString(); txtCountry.Text = dt.Rows[0]["Country"].ToString(); txtZipCode.Text = dt.Rows[0]["ZipCode"].ToString(); txtContactPerson.Text = dt.Rows[0]["ContactPerson"].ToString(); txtContactPersonMobile.Text = dt.Rows[0]["ContactPersonMobile"].ToString(); ddlMultipleDomain.SelectedValue = dt.Rows[0]["MultipleDomain"].ToString(); ddlActive.SelectedValue = dt.Rows[0]["Acitve"].ToString(); } }
private void populateGroupGrid() { string strQry = @"select * from statusmaster "; strQry += "order by StatusName"; DataTable dt = DataAccessor.ExecuteQueryDataTable(strQry); rptUsers.DataSource = dt; rptUsers.DataBind(); }
private void populateGroupGrid() { string strQry = @"select * from Leadmaster where IsBlocked = 0 "; strQry += "order by DateCreated desc"; DataTable dt = DataAccessor.ExecuteQueryDataTable(strQry); rptUsers.DataSource = dt; rptUsers.DataBind(); }
private void populateGroupGrid() { string strQry = @"select * from users where nameofuser != 'Administrator' "; strQry += "order by NameofUser"; DataTable dt = DataAccessor.ExecuteQueryDataTable(strQry); rptUsers.DataSource = dt; rptUsers.DataBind(); }
protected void GetModelData(object sender, EventArgs e) { // int id = int.Parse((sender as Button).CommandArgument); string BlockID = (sender as Button).CommandArgument.ToString(); string strQry = @" select * from leadmaster inner join BlockLeadUser on BlockLeadUser.LeadID = leadmaster. LeadID where BlockLeadUser.UserID = @UserID and BlockLeadUser.BlockID = @BlockID " ; strQry += "order by BlockLeadUser.DateCreated desc"; SqlParameter[] param = new SqlParameter[2]; param[0] = new SqlParameter("@UserID", SqlDbType.NVarChar, 150); param[0].Value = Session["UserID"].ToString(); param[1] = new SqlParameter("@BlockID", SqlDbType.NVarChar, 150); param[1].Value = BlockID; DataTable dt = DataAccessor.ExecuteQueryDataTable(strQry, param); string query2 = @"select * from BlockFollowUp where BlockID =@BlockID"; SqlParameter[] param1 = new SqlParameter[1]; param1[0] = new SqlParameter("@BlockID", SqlDbType.NVarChar, 150); param1[0].Value = BlockID; DataTable dt2 = DataAccessor.ExecuteQueryDataTable(query2, param1); if (dt.Rows.Count > 0) { txtComments.Text = ""; txttags.Text = ""; txtFollowupDate.Text = System.DateTime.Now.ToString("dd/MM/yyyy"); txtNextFollowupDate.Text = System.DateTime.Now.ToString("dd/MM/yyyy"); lblHeading.Text = dt.Rows[0]["DomainName"].ToString(); hdnLeadID.Value = dt.Rows[0]["LeadID"].ToString(); hdnBlockID.Value = dt.Rows[0]["BlockID"].ToString(); rptModalPopupFollowup.DataSource = dt2; rptModalPopupFollowup.DataBind(); ClientScript.RegisterStartupScript(this.GetType(), "Pop", "openModal();", true); } else { ScriptManager.RegisterStartupScript(this, GetType(), "Popup", "FailMessage();", true); } }
private void populateGroupGrid() { string strQry = @" select * from leadmaster inner join BlockLeadUser on BlockLeadUser.LeadID = leadmaster. LeadID where BlockLeadUser.UserID = @UserID " ; strQry += "order by BlockLeadUser.DateCreated desc"; SqlParameter[] param = new SqlParameter[1]; param[0] = new SqlParameter("@UserID", SqlDbType.NVarChar, 150); param[0].Value = Session["UserID"].ToString(); DataTable dt = DataAccessor.ExecuteQueryDataTable(strQry, param); rptUsers.DataSource = dt; rptUsers.DataBind(); }
private void Loaddata(string StatusID) { SqlParameter[] param = new SqlParameter[1]; param[0] = new SqlParameter("@StatusID", SqlDbType.NVarChar); param[0].Value = StatusID; DataTable dt = new DataTable(); dt = DataAccessor.ExecuteQueryDataTable(@" select * from statusmaster where StatusID =@StatusID", param); if (dt.Rows.Count > 0) { // txtProductName.Text= dt.Rows[0]["ProductCode"].ToString(); txtStatus.Text = dt.Rows[0]["StatusName"].ToString(); txtRemark.Text = dt.Rows[0]["Remark"].ToString(); ddlActive.SelectedValue = dt.Rows[0]["Active"].ToString(); } }
private void Loaddata(string UserID) { SqlParameter[] param = new SqlParameter[1]; param[0] = new SqlParameter("@userid", SqlDbType.NVarChar); param[0].Value = UserID; DataTable dt = new DataTable(); dt = DataAccessor.ExecuteQueryDataTable(@" select * from users where userid =@userid", param); if (dt.Rows.Count > 0) { // txtProductName.Text= dt.Rows[0]["ProductCode"].ToString(); txtNameOfUser.Text = dt.Rows[0]["NameofUser"].ToString(); txtDesignation.Text = dt.Rows[0]["Designation"].ToString(); txtUserName.Text = dt.Rows[0]["Username"].ToString(); txtPassword.Text = dt.Rows[0]["Password"].ToString(); txtMobileNo.Text = dt.Rows[0]["Mobile"].ToString(); ddlActive.SelectedValue = dt.Rows[0]["Active"].ToString(); } }
private void populateGroupGrid() { string strQry = @" select distinct leadmaster.leadid,BlockLeadUser.BlockID,DomainName,ComapanyName,EmailID,Mobile,ContactPerson,City,State,Country,ZipCode from leadmaster inner join BlockLeadUser on BlockLeadUser.LeadID = leadmaster. LeadID inner join [BlockFollowUp] on [BlockFollowUp].BlockID = BlockLeadUser.BlockID where BlockLeadUser.UserID = @UserID and StatusID !='C2' "; strQry += " group by leadmaster.leadid,BlockLeadUser.BlockID,DomainName,ComapanyName,EmailID,Mobile,ContactPerson,City,State,Country,ZipCode"; SqlParameter[] param = new SqlParameter[1]; param[0] = new SqlParameter("@UserID", SqlDbType.NVarChar, 150); param[0].Value = Session["UserID"].ToString(); DataTable dt = DataAccessor.ExecuteQueryDataTable(strQry, param); rptUsers.DataSource = dt; rptUsers.DataBind(); }