protected void delete_Click(object sender, EventArgs e) { GridViewRow row = GvSOVMKOMP.SelectedRow; ID_KOMPSOVM = Convert.ToInt32(row.Cells[1].Text.ToString()); DBProc.DelRowSovm(ID_KOMPSOVM, "SOVM_KOMP", "ID_SOVM_KOMP"); GvSOVMKOMP_Load(sender, e); }
protected void update_Click(object sender, EventArgs e) { if (textvvod.Text == "" || textvvod.Text.Length >= 30) { Page.ClientScript.RegisterStartupScript(this.GetType(), "Scripts", "<script>alert('Поле пустое или содержит болше 30 символов');</script>"); } else { GridViewRow row = GvSOVMKOMP.SelectedRow; int id = Convert.ToInt32(row.Cells[1].Text); DBProc.UpdRowSovm(id, "SOVM_KOMP", "ID_SOVM_KOMP", "SOV_KOMP", textvvod.Text); GvSOVMKOMP_Load(sender, e); } }
protected void add_Click(object sender, EventArgs e) { string queryCount = "select COUNT(*) FROM SOVM_KOMP WHERE SOV_KOMP = '" + textvvod.Text + "'"; DBProc.sql.Open(); SqlCommand cmdCount = new SqlCommand(queryCount, DBProc.sql); int count = Convert.ToInt32(cmdCount.ExecuteScalar()); DBProc.sql.Close(); if (textvvod.Text == "" || textvvod.Text.Length >= 30 || count != 0) { textvvod.Text = count.ToString(); Page.ClientScript.RegisterStartupScript(this.GetType(), "Scripts", "<script>alert('Удостоверьтесь, что поле не пустое или текст не превышает 30 символов, или же не было уже введено');</script>"); } else { DBProc.AddRowSovm(textvvod.Text, "SOVM_KOMP", "SOV_KOMP"); GvSOVMKOMP_Load(sender, e); } //Page.ClientScript.RegisterStartupScript(this.GetType(), "Scripts", "<script>alert('Удостоверьтесь, что поле не пустое или текст не превышает 30 символов, или же не было уже введено');</script>"); }
public void Dispose() { _dBProc = null; }
public AuthenticationController() { _dBProc = new DBProc(); }
protected void GvSOVMKOMP_Load(object sender, EventArgs e) { DBProc.FillCompSovm(); GvSOVMKOMP.DataSource = DBProc.compatibilityComponents; GvSOVMKOMP.DataBind(); }
protected void GvSOVMKOMP_Sorting(object sender, GridViewSortEventArgs e) { Sort = true; DBProc.sort(sender, e, sds, DBProc.queryCompatibilityComponents, GvSOVMKOMP); }
protected void filter_Click(object sender, EventArgs e) { DBProc.FilterValue(sds, DBProc.queryCompatibilityComponents, "SOV_KOMP", SOVM.Text, GvSOVMKOMP); }
protected void search_Click(object sender, EventArgs e) { DBProc.SearchValue(SOVM.Text, GvSOVMKOMP); }
protected void texBox_TextChanged(object sender, EventArgs e) { DBProc.SearchValue(texBox.Text, GvSOVM); }
protected void GvSOVM_Load(object sender, EventArgs e) { DBProc.FillComp(); GvSOVM.DataSource = DBProc.compatibility; GvSOVM.DataBind(); }
protected void GvLIZ_Load(object sender, EventArgs e) { DBProc.FillLiz(); GvLIZ.DataSource = DBProc.license; GvLIZ.DataBind(); }
protected void GvSOST_Load(object sender, EventArgs e) { DBProc.FillSost(); GvSOST.DataSource = DBProc.sost; GvSOST.DataBind(); }
protected void GvDOCK_Load(object sender, EventArgs e) { DBProc.FillDock(); GvDOCK.DataSource = DBProc.documents; GvDOCK.DataBind(); }