protected void BtnUpdate_Click(object sender, EventArgs e) { SYS_BMS = new SYS_BMS(); this.BAL_SYS_BMS = new SYS_BMS_BLogic(); SYS_BMS.bmsid = Convert.ToInt32(ViewState["bmsid"].ToString()); SYS_BMS.boardid = Convert.ToInt32(ddlBoardEdit.SelectedValue); SYS_BMS.mediumid = Convert.ToInt32(ddlMediumEdit.SelectedValue); SYS_BMS.standardid = Convert.ToInt32(ddlStandardEdit.SelectedValue); ////SYS_BMS.bms = txtBMSEdit.Text; if (rlstUpdateActive.SelectedValue == "0") { SYS_BMS.issemester = false; } else if (rlstUpdateActive.SelectedValue == "1") { SYS_BMS.issemester = true; } ////SYS_BMS.createdon = txtCreatedOnEdit.Text; SYS_BMS.createdby = Convert.ToInt32(Session["EmpolyeeID"]); Status = BAL_SYS_BMS.BAL_SYS_BMS_Update(SYS_BMS, "Update"); if (Status == 1) { ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "Message", "<script> alert('Record successfully updated.')</script>", false); } else { ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "Message", "<script> alert('Record not updated.')</script>", false); } RefreshPageControls(); }
public DataSet BAL_SYS_BMS_Select_For_Attendance(SYS_BMS SYS_BMS, string mode) { DAL_SYS_BMS = new DataAccess(); arrParameter = new ArrayList(); arrParameter.Add(new parameter("mode", mode)); arrParameter.Add(new parameter("BMSID", SYS_BMS.bmsid)); return(DAL_SYS_BMS.DAL_Select("Proc_SYS_BMSSelectDelete", arrParameter)); }
public DataSet BAL_SYS_BMS_Select(SYS_BMS SYS_BMS, string mode) { DAL_SYS_BMS = new DataAccess(); arrParameter = new ArrayList(); arrParameter.Add(new parameter("mode", mode)); arrParameter.Add(new parameter("BMSID", SYS_BMS.bmsid)); arrParameter.Add(new parameter("BoardID", SYS_BMS.boardid)); arrParameter.Add(new parameter("MediumID", SYS_BMS.mediumid)); arrParameter.Add(new parameter("StandardID", SYS_BMS.standardid)); return(DAL_SYS_BMS.DAL_Select("Proc_SYS_BMSSelectDelete", arrParameter)); }
public void BAL_SYS_BMS_Delete(SYS_BMS SYS_BMS, string mode) { DAL_SYS_BMS = new DataAccess(); arrParameter = new ArrayList(); arrParameter.Add(new parameter("mode", mode)); arrParameter.Add(new parameter("BMSID", SYS_BMS.bmsid)); arrParameter.Add(new parameter("BMSIDStr", SYS_BMS.bmsidStr)); arrParameter.Add(new parameter("BoardID", SYS_BMS.boardid)); arrParameter.Add(new parameter("MediumID", SYS_BMS.mediumid)); arrParameter.Add(new parameter("StandardID", SYS_BMS.standardid)); DAL_SYS_BMS.DAL_Delete("Proc_SYS_BMSSelectDelete", arrParameter); }
public int BAL_SYS_BMS_Update(SYS_BMS SYS_BMS, string mode) { DAL_SYS_BMS = new DataAccess(); arrParameter = new ArrayList(); arrParameter.Add(new parameter("mode", mode)); arrParameter.Add(new parameter("BMSID", SYS_BMS.bmsid)); arrParameter.Add(new parameter("BoardID", SYS_BMS.boardid)); arrParameter.Add(new parameter("MediumID", SYS_BMS.mediumid)); arrParameter.Add(new parameter("StandardID", SYS_BMS.standardid)); arrParameter.Add(new parameter("IsSemester", SYS_BMS.issemester)); arrParameter.Add(new parameter("CreatedBy", SYS_BMS.createdby)); return(DAL_SYS_BMS.DAL_InsertUpdate_Return("Proc_SYS_BMSInsertUpdate", arrParameter)); }
protected void IbtnDelete_Click(object sender, ImageClickEventArgs e) { int CountChecked = 0; string BMSIDStr = string.Empty; foreach (GridViewRow gr in grvSYS_BMSdetail.Rows) { CheckBox chk = new CheckBox(); chk = (CheckBox)gr.FindControl("chkSelect"); if (chk.Checked == true) { if (CountChecked == 0) { BMSIDStr = grvSYS_BMSdetail.DataKeys[gr.RowIndex]["BMSID"].ToString(); } else { BMSIDStr = BMSIDStr + "," + grvSYS_BMSdetail.DataKeys[gr.RowIndex]["BMSID"].ToString(); } CountChecked = CountChecked + 1; } } if (CountChecked == 0) { WebMsg.Show("Please select one record to delete."); } else { SYS_BMS = new SYS_BMS(); this.BAL_SYS_BMS = new SYS_BMS_BLogic(); SYS_BMS.bmsidStr = BMSIDStr; this.BAL_SYS_BMS.BAL_SYS_BMS_Delete(SYS_BMS, "Delete"); //if (Status == 1) //{ // ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "Message", "<script> alert('Record successfully updated.')</script>", false); //} //else //{ // ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "Message", "<script> alert('Record not updated.')</script>", false); //} RefreshPageControls(); } }
protected void BtnSave_Click(object sender, EventArgs e) { try { this.SYS_BMS = new SYS_BMS(); this.BAL_SYS_BMS = new SYS_BMS_BLogic(); SYS_BMS.boardid = Convert.ToInt32(ddlBoard.SelectedValue); SYS_BMS.mediumid = Convert.ToInt32(ddlMedium.SelectedValue); SYS_BMS.standardid = Convert.ToInt32(ddlStandard.SelectedValue); if (rlstAddSemester.SelectedValue == "0") { SYS_BMS.issemester = false; } else if (rlstAddSemester.SelectedValue == "1") { SYS_BMS.issemester = true; } SYS_BMS.createdby = Convert.ToInt32(Session["EmpolyeeID"]); Status = BAL_SYS_BMS.BAL_SYS_BMS_Insert(SYS_BMS, "Insert"); if (Status == 1) { ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "Message", "<script> alert('Record successfully inserted.')</script>", false); } else { ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "Message", "<script> alert('Record not inserted.')</script>", false); } RefreshPageControls(); pnlSearch.CssClass = "Visible"; } catch (Exception ex) { throw ex; } ////finally ////{ ////} }
private void bindgrvSYS_BMSdetail() { SYS_BMS = new SYS_BMS(); this.BAL_SYS_BMS = new SYS_BMS_BLogic(); DataSet dsSelect = new DataSet(); dsSelect = this.BAL_SYS_BMS.BAL_SYS_BMS_Select(SYS_BMS, "SelectAll"); if (dsSelect.Tables.Count > 0) { string searchCondition = string.Empty; if (txtBoardSearch.Text != string.Empty) { searchCondition = "Board like '%" + txtBoardSearch.Text + "%'"; } if (txtMediumSearch.Text != string.Empty) { if (searchCondition != string.Empty) { searchCondition = searchCondition + " and "; } searchCondition = "Medium like '%" + txtMediumSearch.Text + "%'"; } if (txtStandardSearch.Text != string.Empty) { if (searchCondition != string.Empty) { searchCondition = searchCondition + " and "; } searchCondition = "Standard like '%" + txtStandardSearch.Text + "%'"; } if (rlstActive.SelectedValue == "0") { if (searchCondition != string.Empty) { searchCondition = searchCondition + " and "; } searchCondition = searchCondition + "IsSemester ='No'"; } else if (rlstActive.SelectedValue == "1") { if (searchCondition != string.Empty) { searchCondition = searchCondition + " and "; } searchCondition = searchCondition + "IsSemester ='Yes'"; } DataView dv = new DataView(dsSelect.Tables[0]); dv.RowFilter = searchCondition; DataSet dsSelectSub = new DataSet(); dsSelectSub.Tables.Add(dv.ToTable()); GridViewOperations GrvOperation = new GridViewOperations(); GrvOperation.BindGridWithSorting(grvSYS_BMSdetail, dsSelectSub, this.SortField, this.SortDirection); } else { grvSYS_BMSdetail.DataSource = null; grvSYS_BMSdetail.DataBind(); } }