public List <Combo> FindSubSectorBySectorId(string sectorId) { SectorService objWebService = new SectorService(); ComSubSector objComSubSector = new ComSubSector(); DataTable dtPopulateSubSector = null; List <Combo> objList = new List <Combo>(); objWebService.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationSector(); objComSubSector.SectorId = sectorId.ToDecimal(); objComSubSector.Lang = Session["LanguageSetting"].ToString(); dtPopulateSubSector = objWebService.PopulateSubSectorsBySectorId(objComSubSector); if (dtPopulateSubSector != null && dtPopulateSubSector.Rows.Count > 0) { objList.Add(new Combo { ComboId = 0, Name = "छान्नुहोस" }); foreach (DataRow dr in dtPopulateSubSector.Rows) { objList.Add(new Combo { ComboId = dr["ACTIVITY_SUB_SECTOR_ID"].ToInt32(), Name = dr["SUB_SECTOR_NAME"].ToString() }); } } return(objList); }
public int AddSubSector(ComSubSector objComSubSector) { object[] results = this.Invoke("AddSubSector", new object[] { objComSubSector }); return((int)(results[0])); }
public System.Data.DataTable PopulateSubSectorsBySectorId(ComSubSector objComSubSector) { object[] results = this.Invoke("PopulateSubSectorsBySectorId", new object[] { objComSubSector }); return((System.Data.DataTable)(results[0])); }
/// <remarks/> public void PopulateSubSectorsBySectorIdAsync(ComSubSector objComSubSector, object userState) { if ((this.PopulateSubSectorsBySectorIdOperationCompleted == null)) { this.PopulateSubSectorsBySectorIdOperationCompleted = new System.Threading.SendOrPostCallback(this.OnPopulateSubSectorsBySectorIdOperationCompleted); } this.InvokeAsync("PopulateSubSectorsBySectorId", new object[] { objComSubSector }, this.PopulateSubSectorsBySectorIdOperationCompleted, userState); }
/// <remarks/> public void AddSubSectorAsync(ComSubSector objComSubSector, object userState) { if ((this.AddSubSectorOperationCompleted == null)) { this.AddSubSectorOperationCompleted = new System.Threading.SendOrPostCallback(this.OnAddSubSectorOperationCompleted); } this.InvokeAsync("AddSubSector", new object[] { objComSubSector }, this.AddSubSectorOperationCompleted, userState); }
private void PopulateSector() { 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, "--छान्नुहोस्--"); } }
/// <remarks/> public void PopulateSubSectorsBySectorIdAsync(ComSubSector objComSubSector) { this.PopulateSubSectorsBySectorIdAsync(objComSubSector, null); }
/// <remarks/> public void AddSubSectorAsync(ComSubSector objComSubSector) { this.AddSubSectorAsync(objComSubSector, null); }
/// <remarks/> public void PopulateAllSectorsAsync(ComSubSector objComSubSector) { this.PopulateAllSectorsAsync(objComSubSector, null); }
private void PopulateProjectDetails(int projectId) { DataTable dtProjectSansodhan = null; ComProjectBO obj = new ComProjectBO(); DataTable dtPopulateProjectDetails = null; obj.ProjectId = projectId; wbs = new ProjectService(); wbs.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationProject(); dtPopulateProjectDetails = wbs.PopulateProjectDetails(obj); if (dtPopulateProjectDetails != null && dtPopulateProjectDetails.Rows.Count > 0) { ddlBudgetHead.SelectedValue = dtPopulateProjectDetails.Rows[0]["BUDGET_HEAD_ID"].ToString(); txtAyojanaNepName.Text = dtPopulateProjectDetails.Rows[0]["PROJECT_NEP_NAME"].ToString(); txtAyojanaEngName.Text = dtPopulateProjectDetails.Rows[0]["PROJECT_ENG_NAME"].ToString(); txtAyojanaLakshya.Text = dtPopulateProjectDetails.Rows[0]["PROJECT_LAKSHYA"].ToString(); txtAyojanaUdeshya.Text = dtPopulateProjectDetails.Rows[0]["PROJECT_UDESHYA"].ToString(); txtAyojanaPratifal.Text = dtPopulateProjectDetails.Rows[0]["PROJECT_PRATIFAL"].ToString(); txtAyojanaKriyakalap.Text = dtPopulateProjectDetails.Rows[0]["PROJECT_MAIN_ACTIVITY"].ToString(); rblKaryakramPrakar.SelectedValue = dtPopulateProjectDetails.Rows[0]["PROJECT_PROGRAM_TYPE"].ToString(); txtSuruMiti.Text = dtPopulateProjectDetails.Rows[0]["SURU_MITI"].ToString(); txtAyojanaSampannaMiti.Text = dtPopulateProjectDetails.Rows[0]["SAMPAANA_MITI"].ToString(); rbdJalBayuSanket.SelectedValue = dtPopulateProjectDetails.Rows[0]["JALVAYU_SANKET"].ToString(); rbdYojanaRananiti.SelectedValue = dtPopulateProjectDetails.Rows[0]["YOJANA_RANANITI_NO"].ToString(); lblModification.Text = dtPopulateProjectDetails.Rows[0]["MODIFIED_DATE"].ToDateTime().ToString("D"); lblModifiedBy.Text = dtPopulateProjectDetails.Rows[0]["MODIFIED_BY"].ToString(); /* txtAyojanaSampannaMitiPratham.Text =dtPopulateProjectDetails.Rows[0]["SAMPAANA_MITI1"].ToString(); * txtAyojanaSampannaMitiDoshro.Text =dtPopulateProjectDetails.Rows[0]["SAMPAANA_MITI2"].ToString(); * txtAyojanaSampannaMitiTeshro.Text =dtPopulateProjectDetails.Rows[0]["SAMPAANA_MITI3"].ToString();*/ ddlSector.SelectedValue = dtPopulateProjectDetails.Rows[0]["SECTOR_ID"].ToString(); Session["project_ministry_id"] = dtPopulateProjectDetails.Rows[0]["MINISTRY_ID"].ToInt32(); SectorService objWebService = new SectorService(); ComSubSector objComSubSector = new ComSubSector(); DataTable dtPopulateSubSector = null; objWebService.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationSector(); objComSubSector.SectorId = dtPopulateProjectDetails.Rows[0]["SECTOR_ID"].ToInt32(); objComSubSector.Lang = Session["LanguageSetting"].ToString(); dtPopulateSubSector = objWebService.PopulateSubSectorsBySectorId(objComSubSector); if (dtPopulateSubSector != null && dtPopulateSubSector.Rows.Count > 0) { ddlSubSector.DataSource = dtPopulateSubSector; ddlSubSector.DataTextField = "SUB_SECTOR_NAME"; ddlSubSector.DataValueField = "ACTIVITY_SUB_SECTOR_ID"; ddlSubSector.DataBind(); ddlSubSector.Items.Insert(0, "छान्नुहोस्"); } hidSubSector.Value = ddlSubSector.SelectedValue = dtPopulateProjectDetails.Rows[0]["SUB_SECTOR_ID"].ToString(); ProjectService objPs = new ProjectService(); EntitySubSector objCss = new EntitySubSector(); DataTable dtPopulateRananiti = null; objPs.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationProject(); objCss.SubSectorId = ddlSubSector.SelectedValue.ToInt32(); objCss.Lang = Session["LanguageSetting"].ToString(); dtPopulateRananiti = objPs.PopulateRananitiBySubSectorId(objCss); if (dtPopulateRananiti != null && dtPopulateRananiti.Rows.Count > 0) { ddlRananiti.DataSource = dtPopulateRananiti; ddlRananiti.DataTextField = "RANANITI_NAME"; ddlRananiti.DataValueField = "RANANITI_ID"; ddlRananiti.DataBind(); ddlRananiti.Items.Insert(0, "छान्नुहोस्"); } hidRananiti.Value = ddlRananiti.SelectedValue = dtPopulateProjectDetails.Rows[0]["RANANITI_ID"].ToString(); objPs = new ProjectService(); ComProjectBO objComProjectBO = new ComProjectBO(); DataTable dtPopulateKaryaniti = new DataTable(); objPs.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationProject(); objComProjectBO.Rananiti = ddlRananiti.SelectedValue.ToInt32(); objComProjectBO.Lang = Session["LanguageSetting"].ToString(); dtPopulateKaryaniti = objPs.PopulateKaryanitiByRananitiId(objComProjectBO); if (dtPopulateKaryaniti != null && dtPopulateKaryaniti.Rows.Count > 0) { ddlKaryaniti1.DataSource = dtPopulateKaryaniti; ddlKaryaniti1.DataTextField = "KARYANITI_NAME"; ddlKaryaniti1.DataValueField = "KARYANITI_ID"; ddlKaryaniti1.DataBind(); ddlKaryaniti1.Items.Insert(0, "छान्नुहोस्"); ddlKaryaniti2.DataSource = dtPopulateKaryaniti; ddlKaryaniti2.DataTextField = "KARYANITI_NAME"; ddlKaryaniti2.DataValueField = "KARYANITI_ID"; ddlKaryaniti2.DataBind(); ddlKaryaniti2.Items.Insert(0, "छान्नुहोस्"); ddlKaryaniti3.DataSource = dtPopulateKaryaniti; ddlKaryaniti3.DataTextField = "KARYANITI_NAME"; ddlKaryaniti3.DataValueField = "KARYANITI_ID"; ddlKaryaniti3.DataBind(); ddlKaryaniti3.Items.Insert(0, "छान्नुहोस्"); } hidKaryaniti1.Value = ddlKaryaniti1.SelectedValue = dtPopulateProjectDetails.Rows[0]["KARYANITI_ID1"].ToString(); hidKaryaniti2.Value = ddlKaryaniti2.SelectedValue = dtPopulateProjectDetails.Rows[0]["KARYANITI_ID2"].ToString(); hidKaryaniti3.Value = ddlKaryaniti3.SelectedValue = dtPopulateProjectDetails.Rows[0]["KARYANITI_ID3"].ToString(); //added later if (dtPopulateProjectDetails.Rows[0]["SAHASRABDI_OR_DIGO"].ToInt32() == 1) { rbdSahaSrabdiDigo.SelectedValue = "1"; /*sahaSrabdi1.Visible = true; * sahaSrabdi2.Visible = true; * sahaSrabdi3.Visible = true; * digo1.Visible = false; * digo2.Visible = false; * digo3.Visible = false;*/ } else { rbdSahaSrabdiDigo.SelectedValue = "2"; /*sahaSrabdi1.Visible = false; * sahaSrabdi2.Visible = false; * sahaSrabdi3.Visible = false; * digo1.Visible = true; * digo2.Visible = true; * digo3.Visible = true;*/ } ddlSahasabdiBikashLakshya.SelectedValue = dtPopulateProjectDetails.Rows[0]["SAHA_BIKASH_LAKSHYA"].ToString(); ddlDigoBikashLakshya.SelectedValue = dtPopulateProjectDetails.Rows[0]["DIGO_BIKASH_LAKSHYA"].ToString(); if (dtPopulateProjectDetails.Rows[0]["SAHASRABDI_OR_DIGO"].ToInt32() == 1) { PopulateSahashrabdiBikashGantabya(); } else { PopulateDigoBikashGantabya(); } /* objPs = new ProjectService(); * objComProjectBO = new ComProjectBO(); * DataTable dtPopulateGantabya = new DataTable(); * DataTable dtPopulateDigoGantabya = new DataTable(); * * objPs.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationProject(); * objComProjectBO.SahasabdiBikashLakshya = ddlSahasabdiBikashLakshya.SelectedValue.ToInt32(); * objComProjectBO.Lang = Session["LanguageSetting"].ToString(); * objComProjectBO.DigoBikashLakshya = ddlDigoBikashLakshya.SelectedValue.ToInt32(); * dtPopulateGantabya = objPs.PopulateSahashrabdiBikashGantabya(objComProjectBO); * dtPopulateDigoGantabya = objPs.PopulateDigoBikashGantabya(objComProjectBO); * * if (dtPopulateGantabya != null && dtPopulateGantabya.Rows.Count > 0) * { * ddlSahasabdiBikashGantabya.DataSource = dtPopulateGantabya; * ddlSahasabdiBikashGantabya.DataTextField = "GANTABYA_NAME"; * ddlSahasabdiBikashGantabya.DataValueField = "GANTABYA_ID"; * ddlSahasabdiBikashGantabya.DataBind(); * ddlSahasabdiBikashGantabya.Items.Insert(0, "छान्नुहोस्"); * * }*/ hidSahasabdiBikashGantabya.Value = ddlSahasabdiBikashGantabya.SelectedValue = dtPopulateProjectDetails.Rows[0]["SAHA_BIKASH_GANTABYA"].ToString(); /*if (dtPopulateDigoGantabya != null && dtPopulateDigoGantabya.Rows.Count > 0) * { * ddlDigoBikashGantabya.DataSource = dtPopulateDigoGantabya; * ddlDigoBikashGantabya.DataTextField = "DIGO_GANTABYA_NAME"; * ddlDigoBikashGantabya.DataValueField = "DIGO_GANTABYA_ID"; * ddlDigoBikashGantabya.DataBind(); * ddlDigoBikashGantabya.Items.Insert(0, "छान्नुहोस्"); * }*/ hidDigoBikashGantavya.Value = ddlDigoBikashGantabya.SelectedValue = dtPopulateProjectDetails.Rows[0]["DIGO_BIKASH_GANTABYA"].ToString(); if (dtPopulateProjectDetails.Rows[0]["SAHASRABDI_OR_DIGO"].ToInt32() == 1) { PopulateSahashrabdiBikashSuchak(); } else { PopulateDigoBikashSuchak(); } /*objPs = new ProjectService(); * objComProjectBO = new ComProjectBO(); * DataTable dtPopulateSuchak = new DataTable(); * DataTable dtPopulateDigoSuchak = new DataTable(); * objPs.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationProject(); * objComProjectBO.SahasabdiBikashGantabya = ddlSahasabdiBikashGantabya.SelectedValue.ToInt32(); * objComProjectBO.Lang = Session["LanguageSetting"].ToString(); * objComProjectBO.DigoBikashGantabya = ddlDigoBikashGantabya.SelectedValue.ToInt32(); * dtPopulateSuchak = objPs.PopulateSahashrabdiBikashSuchak(objComProjectBO); * dtPopulateDigoSuchak = objPs.PopulateDigoBikashSuchak(objComProjectBO); * if (dtPopulateSuchak != null && dtPopulateSuchak.Rows.Count > 0) * { * ddlSahasabdiBikashSuchak.DataSource = dtPopulateSuchak; * ddlSahasabdiBikashSuchak.DataTextField = "SUCHAK_NAME"; * ddlSahasabdiBikashSuchak.DataValueField = "SUCHAK_ID"; * ddlSahasabdiBikashSuchak.DataBind(); * ddlSahasabdiBikashSuchak.Items.Insert(0, "छान्नुहोस्"); * } * * if (dtPopulateDigoSuchak != null && dtPopulateDigoSuchak.Rows.Count > 0) * { * ddlDigoBikashSuchak.DataSource = dtPopulateDigoSuchak; * ddlDigoBikashSuchak.DataTextField = "DIGO_SUCHAK_NAME"; * ddlDigoBikashSuchak.DataValueField = "DIGO_SUCHAK_ID"; * ddlDigoBikashSuchak.DataBind(); * ddlDigoBikashSuchak.Items.Insert(0, "छान्नुहोस्"); * }*/ hidSahasabdiBikashSuchak.Value = ddlSahasabdiBikashSuchak.SelectedValue = dtPopulateProjectDetails.Rows[0]["SAHA_BIKASH_SUCHAK"].ToString(); hidDigoBikashSuchak.Value = ddlDigoBikashSuchak.SelectedValue = dtPopulateProjectDetails.Rows[0]["DIGO_BIKASH_SUCHAK"].ToString(); rbdGaribiSankhet.SelectedValue = dtPopulateProjectDetails.Rows[0]["GARIBI_SANKET"].ToString(); rbdLaingikSankhet.SelectedValue = dtPopulateProjectDetails.Rows[0]["LAINGIK_SANKET"].ToString(); string AayojanaKisim = dtPopulateProjectDetails.Rows[0]["AAYOJANA_KISIM"].ToString(); List <string> AayojanaType = AayojanaKisim.Split(new char[] { ',' }).ToList <string>(); for (int i = 0; i < chkAyojanaKisim.Items.Count; i++) { for (int j = 0; j < AayojanaType.Count; j++) { if (chkAyojanaKisim.Items[i].Value == AayojanaType[j]) { chkAyojanaKisim.Items[i].Selected = true; break; } } } rbdMadhyaKharchaYojana.SelectedValue = dtPopulateProjectDetails.Rows[0]["PRIORITY"].ToString(); txtKaryanayanNikaya.Text = dtPopulateProjectDetails.Rows[0]["NIKAAYA"].ToString(); txtAyojanaLagat.Text = dtPopulateProjectDetails.Rows[0]["KUL_LAAGAT"].ToString(); if (dtPopulateProjectDetails.Rows[0]["IS_ENABLE"].ToInt32() == 1) { chkEnable.Checked = true; } else { chkEnable.Checked = false; } obj = new ComProjectBO(); obj.ProjectId = projectId; wbs = new ProjectService(); wbs.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationProject(); dtProjectSansodhan = wbs.PopulateProjectSansodhan(obj); dtA = dtProjectSansodhan; if (dtProjectSansodhan != null && dtProjectSansodhan.Rows.Count > 0) { rptSansodhan.DataSource = dtProjectSansodhan; rptSansodhan.DataBind(); foreach (RepeaterItem rptItem in rptSansodhan.Items) { TextBox txtSansodhanDate = new TextBox(); txtSansodhanDate = (TextBox)rptItem.FindControl("txtSansodhanDate"); } } else { dtA.Clear(); DataRow drB = dtA.NewRow(); drB["SANSODHAN_DATE"] = ""; dtA.Rows.Add(drB); rptSansodhan.DataSource = dtA; rptSansodhan.DataBind(); } } }