protected void Page_Init(object sender, EventArgs e) { var _mp = new DlMainpagepopulator(); //get salaries CheckBoxList6.DataSource = _mp.GetSalary(); CheckBoxList6.DataTextField = "sTerm"; CheckBoxList6.DataValueField = "Termid"; CheckBoxList6.DataBind(); //get locations CheckBoxList2.DataSource = _mp.GetLocations(); CheckBoxList2.DataTextField = "sTerm"; CheckBoxList2.DataValueField = "Termid"; CheckBoxList2.DataBind(); //get industry CheckBoxList1.DataSource = _mp.GetIndustries(); CheckBoxList1.DataTextField = "sTerm"; CheckBoxList1.DataValueField = "Termid"; CheckBoxList1.DataBind(); if (Request.QueryString["q"] != null & Request.QueryString["q"] != "all") { TextBox2.Text = Request.QueryString["q"]; } }
protected void Page_Load(object sender, EventArgs e) { //set default inputs TextBox2.Focus(); //Page.Form.DefaultButton = ImageButton2.UniqueID; CLMainpagepopulator cmpag = new CLMainpagepopulator(); if (!IsPostBack) { //constructor CLMainpagepopulator mp = new CLMainpagepopulator(); //get count of all jobs Label13.Text = mp.getcountjobs() + " Jobs Advertized from " + mp.getcountrecswadvert() + " Recruiters"; //populate left //get salaries CheckBoxList6.DataSource = mp.getSalary(); CheckBoxList6.DataTextField = "sTerm"; CheckBoxList6.DataValueField = "Termid"; CheckBoxList6.DataBind(); //get locations CheckBoxList2.DataSource = mp.getLocations(); CheckBoxList2.DataTextField = "sTerm"; CheckBoxList2.DataValueField = "Termid"; CheckBoxList2.DataBind(); //get industry CheckBoxList1.DataSource = mp.getIndustries(); CheckBoxList1.DataTextField = "sTerm"; CheckBoxList1.DataValueField = "Termid"; CheckBoxList1.DataBind(); //main job binding CLMainpagepopulator mpgp = new CLMainpagepopulator(); GridView1.DataSource = mpgp.getJobssingle(); GridView1.DataBind(); //featured Recruiters ClFeaturedrecruiters frec = new ClFeaturedrecruiters(); GridView2.DataSource = frec.GetFRecs(); GridView2.DataBind(); } }
protected void Page_Load(object sender, EventArgs e) { try { se1 = (this.Master.Master as Site1).se1; if (!IsPostBack) { string SCEmailid = Session["username"] + ""; int scode = Convert.ToInt32(Session["scode"]); // check for already answered this survey //List<SCAnswer> scans2 = // (from scans in se1.SCAnswers select scans).ToList(); //if(scans2.Count()>0) //{ // Response.Redirect("scdashboard.aspx"); // return; //} StudyQuestion sq = (from question in se1.StudyQuestions where question.Scode == scode && question.StudyType == "CTHQ" select question).FirstOrDefault(); if (sq != null) { TextBox1.Text = sq.q1; TextBox2.Text = sq.q2; String[] values; TextBox31.Text = sq.q3; TextBox4.Text = sq.q4; TextBox5.Text = sq.q5; values = sq.q6.Split('$'); CheckBoxList6.DataSource = values; CheckBoxList6.DataBind(); } else { } } } catch (Exception exp) { lblmsg.Text = "sorry for inconvenience :" + exp.ToString(); } }
protected void Page_Init(object sender, EventArgs e) { var mp = new DlMainpagepopulator(); //get locations CheckBoxList2.DataSource = mp.GetLocations(); CheckBoxList2.DataTextField = "sTerm"; CheckBoxList2.DataValueField = "Termid"; CheckBoxList2.DataBind(); //get industry CheckBoxList1.DataSource = mp.GetIndustries(); CheckBoxList1.DataTextField = "sTerm"; CheckBoxList1.DataValueField = "Termid"; CheckBoxList1.DataBind(); //get salary CheckBoxList6.DataSource = mp.Getsalaries(); CheckBoxList6.DataTextField = "sTerm"; CheckBoxList6.DataValueField = "Termid"; CheckBoxList6.DataBind(); }
private void BindprocurementRemarksData() { try { DateTime dt1 = new DateTime(); dt1 = DateTime.ParseExact(txt_RemmarksDate.Text, "dd/MM/yyyy", null); if (rd_sesAm.Checked == true) { ses = "AM"; } else { ses = "PM"; } string d1 = dt1.ToString("MM/dd/yyyy"); ds = Bllproimp.LoadProocurementRemarksDatas(ccode, pcode, d1, ses, IncdecFlag); if (ds != null) { CheckBoxList_Sno.DataSource = ds; CheckBoxList_Sno.DataTextField = "serial_no"; CheckBoxList_Sno.DataValueField = "serial_no"; CheckBoxList_Sno.DataBind(); CheckBoxList1.DataSource = ds; CheckBoxList1.DataTextField = "SampleId"; CheckBoxList1.DataValueField = "SampleId"; CheckBoxList1.DataBind(); CheckBoxList2.DataSource = ds; CheckBoxList2.DataTextField = "agent_Id"; CheckBoxList2.DataValueField = "agent_Id"; CheckBoxList2.DataBind(); CheckBoxList3.DataSource = ds; CheckBoxList3.DataTextField = "milk_Kg"; CheckBoxList3.DataValueField = "milk_Kg"; CheckBoxList3.DataBind(); CheckBoxList4.DataSource = ds; CheckBoxList4.DataTextField = "fat"; CheckBoxList4.DataValueField = "fat"; CheckBoxList4.DataBind(); CheckBoxList5.DataSource = ds; CheckBoxList5.DataTextField = "snf"; CheckBoxList5.DataValueField = "snf"; CheckBoxList5.DataBind(); CheckBoxList6.DataSource = ds; CheckBoxList6.DataTextField = "magent_Id"; CheckBoxList6.DataValueField = "magent_Id"; CheckBoxList6.DataBind(); CheckBoxList7.DataSource = ds; CheckBoxList7.DataTextField = "mmilk_Kg"; CheckBoxList7.DataValueField = "mmilk_Kg"; CheckBoxList7.DataBind(); CheckBoxList8.DataSource = ds; CheckBoxList8.DataTextField = "mfat"; CheckBoxList8.DataValueField = "mfat"; CheckBoxList8.DataBind(); CheckBoxList9.DataSource = ds; CheckBoxList9.DataTextField = "msnf"; CheckBoxList9.DataValueField = "msnf"; CheckBoxList9.DataBind(); } //Adding color to differenciate the remarks modifications Start SetColorRemarksData(); //Adding color to differenciate the remarks modifications End } catch (Exception ex) { } CheckBoxListClear1(); }
protected void Button1_Click(object sender, EventArgs e) { string message = ""; string memberno = ""; CheckBoxList2.DataBind(); CheckBoxList3.DataBind(); CheckBoxList4.DataBind(); CheckBoxList5.DataBind(); CheckBoxList6.DataBind(); if (Session["sgques"].ToString() == "SendData") { DataConnection.insertQuery("update message set sgsubmit='T' where QNO=N'" + Session["quesno"].ToString() + "' and Assemblys=N'" + Session["sadan"].ToString() + "' and Session=N'" + Session["session"].ToString() + "'"); DataConnection.insertQuery("insert into miscellenous (other_posist_name,posist_no,posist_date,answer_mem_name,ans_no,ans_date,remark,session,assemblys,quesno) values('" + TextBox8.Text + "','" + TextBox9.Text + "','" + Convert.ToDateTime(TextBox10.Text) + "','" + TextBox11.Text + "','" + TextBox12.Text + "','" + Convert.ToDateTime(TextBox13.Text) + "','" + TextBox14.Text + "','" + Session["session"].ToString() + "','" + Session["sadan"] + "'," + Convert.ToInt32(Session["quesno"].ToString()) + ")"); Response.Redirect("Dashboard.aspx"); } else { if (getCheckBoxCount(CheckBoxList2) > 0) { for (int i = 0; i < CheckBoxList2.Items.Count; i++) { if (CheckBoxList2.Items[i].Selected) { SqlDataReader r1 = DataConnection.selectQuery("select memeberid from member where member_name=N'" + CheckBoxList2.Items[i].Text.Trim() + "'"); if (r1.HasRows) { while (r1.Read()) { memberno = r1.GetInt32(0).ToString(); } } r1.Close(); DataConnection.insertQuery("insert into message(QNO,RCV,Sender,Assemblys,Session) values(N'" + Session["quesno"].ToString() + "',N'" + memberno + "',N'" + Session["RCV"].ToString() + "',N'" + Session["assembly"].ToString() + "',N'" + Session["Session"].ToString() + "')"); } } } if (getCheckBoxCount(CheckBoxList3) > 0) { for (int i = 0; i < CheckBoxList3.Items.Count; i++) { if (CheckBoxList3.Items[i].Selected) { SqlDataReader r = DataConnection.selectQuery("select memeberid from member where location=N'" + CheckBoxList3.Items[i].Text.Trim() + "'"); if (r.HasRows) { while (r.Read()) { memberno = r.GetInt32(0).ToString(); } } r.Close(); DataConnection.insertQuery("insert into message(QNO,RCV,Sender,Assemblys,Session) values(N'" + Session["quesno"].ToString() + "',N'" + memberno + "',N'" + Session["RCV"].ToString() + "',N'" + Session["assembly"].ToString() + "',N'" + Session["Session"].ToString() + "')"); } } } if (getCheckBoxCount(CheckBoxList4) > 0) { for (int i = 0; i < CheckBoxList4.Items.Count; i++) { if (CheckBoxList4.Items[i].Selected) { SqlDataReader re = DataConnection.selectQuery("select memeberid from member where location=N'" + CheckBoxList4.Items[i].Text.Trim() + "'"); if (re.HasRows) { while (re.Read()) { memberno = re.GetInt32(0).ToString(); } re.Close(); DataConnection.insertQuery("insert into message(QNO,RCV,Sender,Assemblys,Session) values(N'" + Session["quesno"].ToString() + "',N'" + memberno + "',N'" + Session["RCV"].ToString() + "',N'" + Session["assembly"].ToString() + "',N'" + Session["Session"].ToString() + "')"); } } } } if (getCheckBoxCount(CheckBoxList5) > 0) { for (int i = 0; i < CheckBoxList5.Items.Count; i++) { if (CheckBoxList5.Items[i].Selected) { SqlDataReader re2 = DataConnection.selectQuery("select memeberid from member where location=N'" + CheckBoxList5.Items[i].Text.Trim() + "'"); if (re2.HasRows) { while (re2.Read()) { memberno = re2.GetInt32(0).ToString(); } re2.Close(); DataConnection.insertQuery("insert into message(QNO,RCV,Sender,Assemblys,Session) values(N'" + Session["quesno"].ToString() + "',N'" + memberno + "',N'" + Session["RCV"].ToString() + "',N'" + Session["assembly"].ToString() + "',N'" + Session["Session"].ToString() + "')"); } } } } if (getCheckBoxCount(CheckBoxList6) > 0) { for (int i = 0; i < CheckBoxList6.Items.Count; i++) { if (CheckBoxList6.Items[i].Selected) { SqlDataReader re3 = DataConnection.selectQuery("select memeberid from member where location=N'" + CheckBoxList6.Items[i].Text.Trim() + "'"); if (re3.HasRows) { while (re3.Read()) { memberno = re3.GetInt32(0).ToString(); } re3.Close(); DataConnection.insertQuery("insert into message(QNO,RCV,Sender,Assemblys,Session) values(N'" + Session["quesno"].ToString() + "',N'" + memberno + "',N'" + Session["RCV"].ToString() + "',N'" + Session["assembly"].ToString() + "',N'" + Session["Session"].ToString() + "')"); } } } } if (getCheckBoxCount(CheckBoxList2) < 0) { message = "Select Atleast Section "; ClientScript.RegisterClientScriptBlock(this.GetType(), "alert", "alert('" + message + "');", true); return; } } message = "Data has Stored Successfully"; ClientScript.RegisterClientScriptBlock(this.GetType(), "alert", "alert('" + message + "');", true); Response.Redirect("Dashboard.aspx"); }