public void BindDegree(string singleuser, string group_user, string collegecode, string usercode) { try { count = 0; chklstdegree.Items.Clear(); if (group_user.Contains(';')) { string[] group_semi = group_user.Split(';'); group_user = group_semi[0].ToString(); } ds2.Dispose(); ds2.Reset(); ds2 = d2.BindDegree(singleuser, group_user, collegecode, usercode); if (ds2.Tables[0].Rows.Count > 0) { chklstdegree.DataSource = ds2; chklstdegree.DataTextField = "course_name"; chklstdegree.DataValueField = "course_id"; chklstdegree.DataBind(); chklstdegree.Items[0].Selected = true; for (int i = 0; i < chklstdegree.Items.Count; i++) { chklstdegree.Items[i].Selected = true; if (chklstdegree.Items[i].Selected == true) { count += 1; } if (chklstdegree.Items.Count == count) { chkdegree.Checked = true; } } if (chkdegree.Checked == true) { for (int i = 0; i < chklstdegree.Items.Count; i++) { chklstdegree.Items[i].Selected = true; txtdegree.Text = "Degree(" + (chklstdegree.Items.Count) + ")"; } } else { for (int i = 0; i < chklstdegree.Items.Count; i++) { chklstdegree.Items[i].Selected = false; txtdegree.Text = "---Select---"; } } txtdegree.Enabled = true; } else { txtdegree.Enabled = false; } } catch (Exception ex) { } }
public void BindDegree(string singleuser, string group_user, string collegecode, string usercode) { try { ddldegree.Items.Clear(); if (group_user.Contains(';')) { string[] group_semi = group_user.Split(';'); group_user = group_semi[0].ToString(); } ds2.Dispose(); ds2.Reset(); ds2 = d2.BindDegree(singleuser, group_user, collegecode, usercode); if (ds2.Tables[0].Rows.Count > 0) { ddldegree.DataSource = ds2; ddldegree.DataTextField = "course_name"; ddldegree.DataValueField = "course_id"; ddldegree.DataBind(); } } catch (Exception ex) { } }
public void BindDegree() { try { txtdegree.Text = "---Select---"; selectcount = 0; chklsdegree.Items.Clear(); if (group_user.Contains(';')) { string[] group_semi = group_user.Split(';'); group_user = group_semi[0].ToString(); } collegecode = ddlcollege.SelectedValue.ToString(); if (collegecode != "") { btngo.Enabled = true; txtbranch.Enabled = true; txtdegree.Enabled = true; txtsec.Enabled = true; txtyear.Enabled = true; ds.Dispose(); ds.Reset(); ds = da.BindDegree(singleuser, group_user, collegecode, usercode); if (ds.Tables[0].Rows.Count > 0) { chklsdegree.DataSource = ds; chklsdegree.DataTextField = "course_name"; chklsdegree.DataValueField = "course_id"; chklsdegree.DataBind(); chklsdegree.Items[0].Selected = true; for (int i = 0; i < chklsdegree.Items.Count; i++) { chklsdegree.Items[i].Selected = true; if (chklsdegree.Items[i].Selected == true) { selectcount += 1; } if (chklsdegree.Items.Count == selectcount) { chkdegree.Checked = true; } } } } else { btngo.Enabled = false; txtbranch.Enabled = false; txtdegree.Enabled = false; txtsec.Enabled = false; txtyear.Enabled = false; } } catch (Exception ex) { throw ex; } }
private void BindDegree(string singleuser, string group_user, string collegecode, string usercode) { try { string DegCode = "0"; string Batch = "0"; string Branch = "0"; string Sem = "0"; ddlDegree.Items.Clear(); if (group_user.Contains(';')) { string[] group_semi = group_user.Split(';'); group_user = group_semi[0].ToString(); } ds.Dispose(); ds.Reset(); ds = d2.BindDegree(singleuser, group_user, collegecode, usercode); if (ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0) { ddlDegree.DataSource = ds; ddlDegree.DataTextField = "course_name"; ddlDegree.DataValueField = "course_id"; ddlDegree.DataBind(); } if (ddlDegree.Items.Count > 0) { DegCode = Convert.ToString(ddlDegree.SelectedItem.Value); } if (ddlBatch.Items.Count > 0) { Batch = Convert.ToString(ddlBatch.SelectedItem.Value); } if (ddlBranch.Items.Count > 0) { Branch = Convert.ToString(ddlBranch.SelectedItem.Value); } BindBranch(singleuser, group_user, DegCode, collegecode, usercode); BindSem(Branch, Batch, collegecode); if (ddlSem.Items.Count > 0) { Sem = Convert.ToString(ddlSem.SelectedItem.Value); } BindSectionDetail(Batch, Branch, Sem, collegecode); } catch (Exception ex) { lblMainErr.Text = ex.ToString(); } }
public void binddegree() { ////degree ddldegree.Items.Clear(); string collegecode = ddlcollege.SelectedItem.Value.ToString(); string usercode = Session["usercode"].ToString(); ds.Clear(); ds = d2.BindDegree(singleuser, group_user, collegecode, usercode); if (ds.Tables[0].Rows.Count > 0) { ddldegree.DataSource = ds; ddldegree.DataValueField = "course_id"; ddldegree.DataTextField = "course_name"; ddldegree.DataBind(); } //bindbranch(); }
//------Load Function for the Degree Details----- public void BindDegree(string singleuser, string group_user, string collegecode, string usercode) { try { chklstdegree.Items.Clear(); if (group_user.Contains(';')) { string[] group_semi = group_user.Split(';'); group_user = group_semi[0].ToString(); } ds2.Dispose(); ds2.Reset(); ds2 = d2.BindDegree(singleuser, group_user, collegecode, usercode); if (ds2.Tables[0].Rows.Count > 0) { chklstdegree.DataSource = ds2; chklstdegree.DataTextField = "course_name"; chklstdegree.DataValueField = "course_id"; chklstdegree.DataBind(); for (int i = 0; i < chklstdegree.Items.Count; i++) { chklstdegree.Items[i].Selected = true; if (chklstdegree.Items[i].Selected == true) { count1 += 1; } if (chklstdegree.Items.Count == count1) { chkdegree.Checked = true; } } } } catch (Exception ex) { errmsg.Text = "Please Choose Degree"; //errmsg.Visible = true; } }
public void BindDegree() { try { chklstdegree.Items.Clear(); chkdegree.Checked = false; txtdegree.Text = "---Select---"; collegecode = ddlclg.SelectedItem.Value; if (group_user.Contains(";")) { string[] group_semi = group_user.Split(';'); group_user = group_semi[0].ToString(); } ds2.Dispose(); ds2.Reset(); ds2 = d2.BindDegree(singleuser, group_user, collegecode, usercode); if (ds2.Tables[0].Rows.Count > 0) { chklstdegree.DataSource = ds2; chklstdegree.DataTextField = "course_name"; chklstdegree.DataValueField = "course_id"; chklstdegree.DataBind(); for (int i = 0; i < chklstdegree.Items.Count; i++) { chklstdegree.Items[i].Selected = true; } chkdegree.Checked = true; txtdegree.Text = "Degree(" + (chklstdegree.Items.Count) + ")"; } } catch (Exception ex) { lbl_errmsg.Text = ex.ToString(); lbl_errmsg.Visible = true; } }
public void binddeg() { try { ddl_degree.Items.Clear(); batch = ""; batch = Convert.ToString(ddl_batch.SelectedValue.ToString()); if (batch != "") { ds.Clear(); ds = d2.BindDegree(singleuser, group_user, collegecode1, usercode); if (ds.Tables[0].Rows.Count > 0) { ddl_degree.DataSource = ds; ddl_degree.DataTextField = "course_name"; ddl_degree.DataValueField = "course_id"; ddl_degree.DataBind(); } } } catch { } }
public void BindDegree() { try { txtdegree.Text = "---Select---"; chkdegree.Checked = false; count = 0; collegecode = ddlcollege.SelectedValue.ToString(); chklsdegree.Items.Clear(); if (group_user.Contains(';')) { string[] group_semi = group_user.Split(';'); group_user = group_semi[0].ToString(); } ds2.Dispose(); ds2.Reset(); ds2 = d2.BindDegree(singleuser, group_user, collegecode, usercode); if (ds2.Tables[0].Rows.Count > 0) { chklsdegree.DataSource = ds2; chklsdegree.DataTextField = "course_name"; chklsdegree.DataValueField = "course_id"; chklsdegree.DataBind(); chklsdegree.Items[0].Selected = true; txtdegree.Enabled = true; txtdegree.Text = "Degree (1)"; } else { txtdegree.Enabled = false; } } catch { } }
public void BindDegree(string singleuser, string group_user, string collegecode, string usercode) { try { ds.Clear(); string slq = "select Course_Id from course where type='" + ddltype.SelectedItem.Text.ToString() + "' and college_code='" + ddlcollege.SelectedItem.Value.ToString() + "'"; //if (ddltype.SelectedItem.Text.ToString().Trim().ToUpper()=="ALL") //{ // slq = "select Course_Id from course where college_code='" + ddlcollege.SelectedItem.Value.ToString() + "'"; //} ds = da.select_method_wo_parameter(slq, "Text"); slq = ""; for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { if (slq == "") { slq = ds.Tables[0].Rows[i][0].ToString(); } else { slq = slq + "','" + ds.Tables[0].Rows[i][0].ToString(); } } lblerrormsg.Visible = false; count = 0; chklstdegree.Items.Clear(); if (group_user.Contains(';')) { string[] group_semi = group_user.Split(';'); group_user = group_semi[0].ToString(); } ds2.Dispose(); ds2.Reset(); ds2 = d2.BindDegree(singleuser, group_user, collegecode, usercode); if (slq.Trim() != "") { slq = "course_id in ('" + slq + "')"; ds2.Tables[0].DefaultView.RowFilter = slq; dv = ds2.Tables[0].DefaultView; } else { dv = ds2.Tables[0].DefaultView; } if (dv.Count > 0) { chklstdegree.DataSource = dv; chklstdegree.DataTextField = "course_name"; chklstdegree.DataValueField = "course_id"; chklstdegree.DataBind(); chklstdegree.Items[0].Selected = true; for (int i = 0; i < chklstdegree.Items.Count; i++) { chklstdegree.Items[i].Selected = true; if (chklstdegree.Items[i].Selected == true) { count += 1; } if (chklstdegree.Items.Count == count) { chkdegree.Checked = true; } } if (chkdegree.Checked == true) { for (int i = 0; i < chklstdegree.Items.Count; i++) { chklstdegree.Items[i].Selected = true; txtdegree.Text = "Degree(" + (chklstdegree.Items.Count) + ")"; } } else { for (int i = 0; i < chklstdegree.Items.Count; i++) { chklstdegree.Items[i].Selected = false; txtdegree.Text = "---Select---"; } } txtdegree.Enabled = true; } else { txtdegree.Enabled = false; } } catch (Exception ex) { lblerrormsg.Text = ex.ToString(); lblerrormsg.Visible = true; } }