public virtual CloudAccountDA.FormGridMasterAdminMasterDataTable GetData(int?ModuleID) { this.Adapter.SelectCommand = this.CommandCollection[0]; if (ModuleID.HasValue) { this.Adapter.SelectCommand.Parameters[1].Value = ModuleID.Value; } else { this.Adapter.SelectCommand.Parameters[1].Value = DBNull.Value; } CloudAccountDA.FormGridMasterAdminMasterDataTable dataTable = new CloudAccountDA.FormGridMasterAdminMasterDataTable(); this.Adapter.Fill(dataTable); return(dataTable); }
public virtual int Fill(CloudAccountDA.FormGridMasterAdminMasterDataTable dataTable, int?ModuleID) { this.Adapter.SelectCommand = this.CommandCollection[0]; if (ModuleID.HasValue) { this.Adapter.SelectCommand.Parameters[1].Value = ModuleID.Value; } else { this.Adapter.SelectCommand.Parameters[1].Value = DBNull.Value; } if (this.ClearBeforeFill) { dataTable.Clear(); } return(this.Adapter.Fill(dataTable)); }
private void ViewRecord(string empID) { this.objMasterAdminUserRightsMasterDT = this.objMasterAdminUserRightsMasterBll.GetDataByViewRecords(int.Parse(empID)); if (this.objMasterAdminUserRightsMasterDT.Rows.Count <= 0) { return; } this.ddlMasterAdmin.SelectedValue = this.objMasterAdminUserRightsMasterDT.Rows[0]["MasterAdminID"].ToString(); this.ddlMasterAdmin.DataBind(); this.objFormGridMasterDT = this.objFormGridMasterBll.GetAllData(new int?()); if (this.objFormGridMasterDT.Rows.Count <= 0) { return; } this.gvForm.DataSource = (object)this.objFormGridMasterDT; this.gvForm.DataBind(); this.gvForm.Enabled = false; this.btnEdit.Visible = false; }
private void SetRecord(string empID, string mID) { if (MasterAdminRightsMaster.AddMode == "Edit") { this.objMasterAdminUserRightsMasterDT = this.objMasterAdminUserRightsMasterBll.GetDataBySelectRightsDetails(int.Parse(empID), int.Parse(mID)); if (this.objMasterAdminUserRightsMasterDT.Rows.Count <= 0) { return; } this.ddlMasterAdmin.SelectedValue = this.objMasterAdminUserRightsMasterDT.Rows[0]["MasterAdminID"].ToString(); this.ddlMasterAdmin.DataBind(); this.ddlModule.SelectedValue = this.objMasterAdminUserRightsMasterDT.Rows[0]["ModuleID"].ToString(); this.ddlModule.DataBind(); this.objFormGridMasterDT = this.objFormGridMasterBll.GetAllData(new int?()); this.gvForm.DataSource = (object)this.objMasterAdminUserRightsMasterDT; this.gvForm.DataBind(); this.gvForm.Enabled = false; this.btnEdit.Visible = true; } else { this.objMasterAdminUserRightsMasterDT = this.objMasterAdminUserRightsMasterBll.GetDataBySelectRightsDetails(int.Parse(empID), int.Parse(mID)); if (this.objMasterAdminUserRightsMasterDT.Rows.Count <= 0) { return; } this.ddlMasterAdmin.SelectedValue = this.objMasterAdminUserRightsMasterDT.Rows[0]["MasterAdminID"].ToString(); this.ddlMasterAdmin.DataBind(); this.ddlModule.SelectedValue = this.objMasterAdminUserRightsMasterDT.Rows[0]["ModuleID"].ToString(); this.ddlModule.DataBind(); this.objFormGridMasterDT = this.objFormGridMasterBll.GetAllData(new int?()); this.gvForm.DataSource = (object)this.objMasterAdminUserRightsMasterDT; this.gvForm.DataBind(); this.gvForm.Enabled = true; this.btnEdit.Visible = true; } }
private void SubBindGrid() { if (MasterAdminRightsMaster.AddMode == "Edit") { string selectedValue = this.ddlModule.SelectedValue; if (string.IsNullOrEmpty(this.ddlModule.SelectedValue) && string.IsNullOrEmpty(this.ddlMasterAdmin.SelectedValue)) { this.objFormGridMasterDT = this.objFormGridMasterBll.GetAllData(new int?()); if (this.objFormGridMasterDT.Rows.Count <= 0) { return; } this.gvForm.DataSource = (object)this.objFormGridMasterDT; this.gvForm.DataBind(); this.gvForm.Enabled = false; this.btnEdit.Visible = false; } else { this.objMasterAdminUserRightsMasterDT = this.objMasterAdminUserRightsMasterBll.GetDataBySelectRightsDetails(int.Parse(this.ddlMasterAdmin.SelectedValue.Trim()), int.Parse(this.ddlModule.SelectedValue.Trim())); if (this.objMasterAdminUserRightsMasterDT.Rows.Count > 0) { this.gvForm.DataSource = (object)this.objMasterAdminUserRightsMasterDT; this.gvForm.DataBind(); this.gvForm.Enabled = false; this.btnEdit.Visible = true; } else { this.objFormGridMasterDT = this.objFormGridMasterBll.GetAllData(new int?(int.Parse(selectedValue))); if (this.objFormGridMasterDT.Rows.Count > 0) { this.gvForm.DataSource = (object)this.objFormGridMasterDT; this.gvForm.DataBind(); this.gvForm.Enabled = false; this.btnEdit.Visible = false; } else { this.gvForm.DataSource = (object)this.objFormGridMasterDT; this.gvForm.DataBind(); this.btnEdit.Visible = false; } } } } else { string selectedValue = this.ddlModule.SelectedValue; if (string.IsNullOrEmpty(this.ddlModule.SelectedValue) && string.IsNullOrEmpty(this.ddlMasterAdmin.SelectedValue)) { this.objFormGridMasterDT = this.objFormGridMasterBll.GetAllData(new int?()); if (this.objFormGridMasterDT.Rows.Count <= 0) { return; } this.gvForm.DataSource = (object)this.objFormGridMasterDT; this.gvForm.Enabled = false; this.btnSubmit.Visible = false; this.btnReset.Visible = false; this.gvForm.DataBind(); } else { this.objMasterAdminUserRightsMasterDT = this.objMasterAdminUserRightsMasterBll.GetDataBySelectRightsDetails(int.Parse(this.ddlMasterAdmin.SelectedValue.Trim()), int.Parse(this.ddlModule.SelectedValue.Trim())); if (this.objMasterAdminUserRightsMasterDT.Rows.Count > 0) { this.gvForm.DataSource = (object)this.objMasterAdminUserRightsMasterDT; this.gvForm.DataBind(); this.gvForm.Enabled = false; this.btnSubmit.Visible = false; this.btnReset.Visible = false; } else { this.objFormGridMasterDT = this.objFormGridMasterBll.GetAllData(new int?(int.Parse(selectedValue))); if (this.objFormGridMasterDT.Rows.Count > 0) { this.gvForm.DataSource = (object)this.objFormGridMasterDT; this.gvForm.DataBind(); this.gvForm.Enabled = true; this.btnSubmit.Visible = true; this.btnReset.Visible = true; } else { this.gvForm.DataSource = (object)this.objFormGridMasterDT; this.gvForm.DataBind(); this.btnSubmit.Visible = false; this.btnReset.Visible = false; } } } } }