public virtual CloudAccountDA.ModuleFormMasterDataTable GetData() { this.Adapter.SelectCommand = this.CommandCollection[0]; CloudAccountDA.ModuleFormMasterDataTable dataTable = new CloudAccountDA.ModuleFormMasterDataTable(); this.Adapter.Fill(dataTable); return(dataTable); }
private void SetRecord(string iD) { this.objModuleFormMasterDT = this.objModuleFormMasterBll.GetDataByModuleFormID(int.Parse(iD)); if (this.objModuleFormMasterDT.Rows.Count <= 0) { return; } this.hfModuleFormID.Value = this.objModuleFormMasterDT.Rows[0]["ModuleFormID"].ToString(); this.hfFormID.Value = this.objModuleFormMasterDT.Rows[0]["FormID"].ToString(); this.hfModuleID.Value = this.objModuleFormMasterDT.Rows[0]["ModuleID"].ToString(); this.objModuleMasterDT = this.objModuleMasterBll.GetDataByModuleID(int.Parse(this.hfModuleID.Value)); if (this.objModuleMasterDT.Rows.Count > 0) { this.ddlModule.Items.Add(this.objModuleMasterDT.Rows[0]["ModuleID"].ToString()); this.ddlModule.SelectedValue = this.objModuleMasterDT.Rows[0]["ModuleID"].ToString(); } this.ddlModule.Enabled = false; this.SetGridForNewRecord(); this.objModuleFormMasterDT = this.objModuleFormMasterBll.GetDataByModuleID(int.Parse(this.hfModuleID.Value)); for (int index1 = 0; index1 < this.objModuleFormMasterDT.Rows.Count; ++index1) { string str = this.objModuleFormMasterDT.Rows[index1]["ModuleFormName"].ToString(); for (int index2 = 0; index2 < this.gvFormAdd.Rows.Count; ++index2) { string text = this.gvFormAdd.Rows[index2].Cells[1].Text; CheckBox checkBox = (CheckBox)this.gvFormAdd.Rows[index2].FindControl("chkModuleForm"); if (text == str) { checkBox.Checked = true; checkBox.Enabled = true; break; } } } }
public virtual int Fill(CloudAccountDA.ModuleFormMasterDataTable dataTable) { this.Adapter.SelectCommand = this.CommandCollection[0]; if (this.ClearBeforeFill) { dataTable.Clear(); } return(this.Adapter.Fill(dataTable)); }
private void ViewRecord(string i) { this.objModuleFormMasterDT = this.objModuleFormMasterBll.GetDataByModuleFormID(int.Parse(i)); if (this.objModuleFormMasterDT.Rows.Count <= 0) { return; } this.hfModuleFormID.Value = this.objModuleFormMasterDT.Rows[0]["ModuleFormID"].ToString(); this.hfFormID.Value = this.objModuleFormMasterDT.Rows[0]["FormID"].ToString(); this.hfModuleID.Value = this.objModuleFormMasterDT.Rows[0]["ModuleID"].ToString(); this.objModuleMasterDT = this.objModuleMasterBll.GetDataByModuleID(int.Parse(this.hfModuleID.Value)); this.lblModule.Text = this.objModuleMasterDT.Rows[0]["ModuleName"].ToString(); }
protected void btnSubmit_Click(object sender, EventArgs e) { if (!this.Page.IsValid) { return; } int num = 0; if (this.ddlModule.Text.Trim().Length > 0) { this.objModuleFormMasterDT = this.objModuleFormMasterBll.GetDataByModuleID(int.Parse(this.ddlModule.SelectedItem.Value)); if (this.objModuleFormMasterDT.Rows.Count > 0) { this.DisplayAlert("Module Entry Already Exists..!"); this.checkInDB = true; } if (this.checkInDB) { return; } if (this.gvFormAdd.Rows.Count > 0) { for (int index = 0; index < this.gvFormAdd.Rows.Count; ++index) { string text1 = this.gvFormAdd.Rows[index].Cells[0].Text; string text2 = this.gvFormAdd.Rows[index].Cells[1].Text; CheckBox checkBox = (CheckBox)this.gvFormAdd.Rows[index].Cells[2].FindControl("chkModuleForm"); if (checkBox.Checked) { num = this.objModuleFormMasterBll.AddModuleForm(int.Parse(this.ddlModule.SelectedItem.Value), int.Parse(text1), text2, checkBox.Checked); } } } if (num != 0) { this.DisplayAlert("Details Added Successfully."); this.Response.Redirect("~/BillTransact/ModuleFormMaster.aspx?cmd=view&ID=" + (object)num); } else { this.DisplayAlert("Fail to Add New Details."); this.Clear(); } } else { this.DisplayAlert("Please Fill All Details...!"); } }
public virtual CloudAccountDA.ModuleFormMasterDataTable DeleteByModuleID(int?ModuleID) { this.Adapter.SelectCommand = this.CommandCollection[1]; if (ModuleID.HasValue) { this.Adapter.SelectCommand.Parameters[1].Value = ModuleID.Value; } else { this.Adapter.SelectCommand.Parameters[1].Value = DBNull.Value; } CloudAccountDA.ModuleFormMasterDataTable dataTable = new CloudAccountDA.ModuleFormMasterDataTable(); this.Adapter.Fill(dataTable); return(dataTable); }
private void SetGridForNewRecord() { this.objModuleFormMasterDT = this.objModuleFormMasterBll.GetAllDetail(); for (int index1 = 0; index1 < this.objModuleFormMasterDT.Rows.Count; ++index1) { string str = this.objModuleFormMasterDT.Rows[index1]["ModuleFormName"].ToString(); for (int index2 = 0; index2 < this.gvFormAdd.Rows.Count; ++index2) { string text = this.gvFormAdd.Rows[index2].Cells[1].Text; CheckBox checkBox = (CheckBox)this.gvFormAdd.Rows[index2].FindControl("chkModuleForm"); if (text == str) { checkBox.Enabled = false; break; } } } }
public virtual int Update(CloudAccountDA.ModuleFormMasterDataTable dataTable) { return(this.Adapter.Update(dataTable)); }