public int AddSubSector(ComSubSector objComSubSector) { Authentication(); SectorManagementDAL objDAL = new SectorManagementDAL(); return(objDAL.AddSubSector(objComSubSector)); }
public DataTable PopulateSubSectorsBySectorId(ComSubSector objComSubSector) { Authentication(); SectorManagementDAL objDAL = new SectorManagementDAL(); return(objDAL.PopulateSubSectorsBySectorId(objComSubSector)); }
public DataTable PopulateAllSubSectors(ComSubSector objComSubSector) { Authentication(); SectorManagementDAL objDAL = new SectorManagementDAL(); return(objDAL.SelectSubSector(objComSubSector)); }
private void populateSubSector(int i) { objWebService = new SectorService(); objWebService.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationSector(); ComSubSector objComSubSector = new ComSubSector(); objComSubSector.SubSectorId = i; DataTable dtPopulateSubSector = objWebService.PopulateAllSubSectors(objComSubSector); Session["dtPopulateSubSector"] = dtPopulateSubSector; if (dtPopulateSubSector != null && dtPopulateSubSector.Rows.Count > 0) { txtSubSectorEngName.Text = dtPopulateSubSector.Rows[0]["activity_sub_sector_eng_name"].ToString(); txtSubSectorNepName.Text = dtPopulateSubSector.Rows[0]["activity_sub_sector_nep_name"].ToString(); txtSubSectorCode.Text = dtPopulateSubSector.Rows[0]["activity_sub_sector_code"].ToString(); ddlSector.SelectedValue = dtPopulateSubSector.Rows[0]["activity_sector_id"].ToString(); if (Convert.ToInt16(dtPopulateSubSector.Rows[0]["ISENABLE"]) == 1) { chkIsEnable.Checked = true; } else { chkIsEnable.Checked = false; } } }
protected void BtnEdit_Command(object sender, CommandEventArgs e) { int subSectorId = 0; if (e.CommandName == "edit") { subSectorId = int.Parse(e.CommandArgument.ToString()); SecureQueryString str = new SecureQueryString(); str["id"] = e.CommandArgument.ToString(); Response.Redirect(Constants.ConstantAppPath + "/Modules/SectorManagement/AddEditSubSector.aspx" + str.EncryptedString, false); } else if (e.CommandName == "delete") { objComSubSector = new ComSubSector(); objComSubSector.SubSectorId = int.Parse(e.CommandArgument.ToString()); objComSubSector.Mode = "D"; objWebService = new SectorService(); objWebService.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationSector(); objWebService.AddSubSector(objComSubSector); Response.Redirect(Constants.ConstantAppPath + "/Modules/SectorManagement/ListSubSector.aspx"); } else if (e.CommandName == "lock") { int i = 0; objComSubSector = new ComSubSector(); objComSubSector.SubSectorId = int.Parse(e.CommandArgument.ToString()); objComSubSector.Mode = "L"; objWebService = new SectorService(); objWebService.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationSector(); i = objWebService.AddSubSector(objComSubSector); if (i > 0) { Response.Redirect(Constants.ConstantAppPath + "/Modules/SectorManagement/ListSubSector.aspx"); } else { Response.Write("<script>alert('Lock failed')</script>"); } } else { int i = 0; objComSubSector = new ComSubSector(); objComSubSector.SubSectorId = int.Parse(e.CommandArgument.ToString()); objComSubSector.Mode = "L"; objWebService = new SectorService(); objWebService.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationSector(); i = objWebService.AddSubSector(objComSubSector); if (i > 0) { Response.Redirect(Constants.ConstantAppPath + "/Modules/SectorManagement/ListSubSector.aspx"); } else { Response.Write("<script>alert('Unlock failed')</script>"); } } }
public DataTable PopulateSubSectorsBySectorId(ComSubSector objComSubSector) { DbCommand cmd = db.GetStoredProcCommand("PKG_ACTIVITY_SUB_SECTOR.PR_Select_SubSectorsBySectorId", objComSubSector.SectorId, objComSubSector.Lang, OracleDbType.RefCursor); DataSet ds = null; DataTable dt = null; ds = db.ExecuteDataSet(cmd); if (ds != null && ds.Tables.Count > 0) { dt = ds.Tables[0]; } return(dt); }
private void BindListView() { objWebService = new SectorService(); objComSubSector = new ComSubSector(); objWebService.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationSector(); objComSubSector.Lang = Session["LanguageSetting"].ToString(); dtListView = objWebService.PopulateAllSubSectors(objComSubSector); if (dtListView != null && dtListView.Rows.Count > 0) { lvSubSector.DataSource = dtListView; lvSubSector.DataBind(); } else { } }
public int AddSubSector(ComSubSector objComSubSector) { int i = 0; DbCommand cmd = null; cmd = db.GetStoredProcCommand("PKG_ACTIVITY_SUB_SECTOR.PR_ACTIVITY_SUB_SECTOR"); db.AddInParameter(cmd, "V_ACTIVITY_SUB_SECTOR_ID", DbType.Decimal, objComSubSector.SubSectorId); db.AddInParameter(cmd, "V_MODE", DbType.String, objComSubSector.Mode); db.AddInParameter(cmd, "V_ACTIVITY_SECTOR_ID", DbType.Decimal, objComSubSector.SectorId); db.AddInParameter(cmd, "V_ACTIVITY_SUB_SECTOR_ENG_NAME", DbType.String, objComSubSector.SubSectorEngName); db.AddInParameter(cmd, "V_ACTIVITY_SUB_SECTOR_NEP_NAME", DbType.String, objComSubSector.SubSectorNepName); db.AddInParameter(cmd, "V_ACTIVITY_SUB_SECTOR_CODE", DbType.String, objComSubSector.SubSectorCode); db.AddInParameter(cmd, "V_ISENABLE", DbType.Int16, objComSubSector.Isenable); db.AddInParameter(cmd, "V_ISLOCKED", DbType.Int16, objComSubSector.Islocked); i = db.ExecuteNonQuery(cmd); return(i); }
private void populateSectors() { ComSubSector objComSubSector = new ComSubSector(); SectorService objWebService = new SectorService(); DataTable dtPopulateSector = null; objComSubSector.Lang = Session["LanguageSetting"].ToString(); objWebService.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationSector(); dtPopulateSector = objWebService.PopulateAllSectors(objComSubSector); if (dtPopulateSector != null && dtPopulateSector.Rows.Count > 0) { ddlSector.DataSource = dtPopulateSector; ddlSector.DataValueField = "SECTOR_ID"; ddlSector.DataTextField = "SECTOR_NAME"; ddlSector.DataBind(); ddlSector.Items.Insert(0, "--क्षेत्र छान्नुहोस्--"); } }
protected void btnAddSubSector_Click(object sender, EventArgs e) { int i = 0; objComSubSector = new ComSubSector(); objComSubSector.SubSectorEngName = txtSubSectorEngName.Text; objComSubSector.SubSectorNepName = txtSubSectorNepName.Text; objComSubSector.SubSectorCode = txtSubSectorCode.Text; objComSubSector.SectorId = ddlSector.SelectedValue.ToInt32(); objComSubSector.SubSectorId = Session["subSectorId"].ToInt32(); objComSubSector.Islocked = 0; if (chkIsEnable.Checked == true) { objComSubSector.Isenable = 1; } else { objComSubSector.Isenable = 0; } objComSubSector.Lang = Session["LanguageSetting"].ToString(); if (Session["subSectorId"].ToInt32() == 0) { objComSubSector.Mode = "I"; } else { objComSubSector.Mode = "U"; } objWebService = new SectorService(); objWebService.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationSector(); i = objWebService.AddSubSector(objComSubSector); if (i > 0) { Response.Write("<script>alert('Sub Sector added successfully!')</script>"); Response.Redirect(Constants.ConstantAppPath + "/Modules/SectorManagement/ListSubSector.aspx"); } else { Response.Write("<script>alert('Sub Sector addition failed!')</script>"); } }
private void populateSubSector() { SectorService objWebService = new SectorService(); objWebService.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationSector(); DataTable dtPopulateSubSector = null; string selectedDataText = string.Empty; ComSubSector objComSubSector = new ComSubSector(); dtPopulateSubSector = objWebService.PopulateAllSubSectors(objComSubSector); if (dtPopulateSubSector != null && dtPopulateSubSector.Rows.Count > 0) { selectedDataText = Session["LanguageSetting"].ToString() == "Nepali" ? "activity_sub_sector_nep_name" : "activity_sub_sector_eng_name"; ddlSubSector.DataSource = dtPopulateSubSector; ddlSubSector.DataTextField = selectedDataText; ddlSubSector.DataValueField = "activity_sub_sector_id"; ddlSubSector.DataBind(); ddlSubSector.Items.Insert(0, "-- छान्नुहोस्--"); } }
public DataTable PopulateRananitiBySubSectorId(ComSubSector objComSubSector) { Authentication(); return(objProject.PopulateRananitiBySubSectorId(objComSubSector)); }