private void FillProjectDataForNewEntry() { TTSHWCFServiceClient servcl = new TTSHWCFServiceClient(); List <PI_Master> piLst = new List <PI_Master>(); List <Project_Master> pjmasterlist = new List <Project_Master>(); GrantMasterDetails grantmasterdetails = new GrantMasterDetails(); try { txtparentprojectamount.Text = "0"; txtRemainingAmount.Text = "0"; HdnParentProjectDurId.Value = "0"; HdnParentProjectAmount.Value = "0"; HdnMaxChildDurationId.Value = "0"; HdnMaxChildduration.Value = ""; grantmasterdetails = servcl.GetNewProjectDetailsForGrant(Convert.ToInt32(HdnProjectId.Value)); piLst = grantmasterdetails.Pilisst.ToList(); pjmasterlist.Add(grantmasterdetails.project); TxtProjTitle.Text = pjmasterlist.ListToDatatable().Rows[0]["s_Project_Title"].ToString(); TxtAlias1.Text = pjmasterlist.ListToDatatable().Rows[0]["s_Project_Alias1"].ToString(); TxtAlias2.Text = pjmasterlist.ListToDatatable().Rows[0]["s_Project_Alias2"].ToString(); TxtShortTitle.Text = pjmasterlist.ListToDatatable().Rows[0]["s_Short_Title"].ToString(); TxtIrbNo.Text = pjmasterlist.ListToDatatable().Rows[0]["s_IRB_No"].ToString(); //ddlProjCategory.Text = pjmasterlist.ListToDatatable().Rows[0]["Project_Category_Name"].ToString(); // ddlProjCategory.SelectedItem.Text = pjmasterlist.ListToDatatable().Rows[0]["Project_Category_Name"].ToString(); DispProjectId.InnerText = pjmasterlist.ListToDatatable().Rows[0]["s_Display_Project_ID"].ToString(); rptrPIDetails.DataSource = piLst; rptrPIDetails.DataBind(); HdnUpdateMode.Value = "0"; if (pjmasterlist[0].b_Ischild == true && pjmasterlist[0].i_Parent_ProjectID > 0) { if (grantmasterdetails.parentProject.GrantApplied) { TxtParentProjectId.Text = grantmasterdetails.parentProject.s_Display_Project_ID.ToString(); TxtParentProjectName.Text = grantmasterdetails.parentProject.s_Project_Title.ToString(); txtparentprojectamount.Text = grantmasterdetails.parentProject.Total_Amount.ToString(); txtRemainingAmount.Text = grantmasterdetails.parentProject.Remaining_Amount.ToString(); txtparentprojectduration.Text = grantmasterdetails.parentProject.s_Duration.ToString(); HdnParentProjectDurId.Value = grantmasterdetails.parentProject.i_DurationID.ToString(); } else { this.MsgBox("Please Apply grant application for Parent project first"); ShowPanel(); FillGridMain(); this.MsgBox("Please Apply grant application for Parent project first"); } } SHowParentInformation(pjmasterlist[0].b_Ischild); txtProjCategory.Text = pjmasterlist[0].Project_Category_Name.ToString(); // this.CallJs("$('.s_Old_Application_ID').attr('disabled', !($('.i_SubmissionStatus').find('option:selected').text().toLowerCase() == 'Re-Submission'.toLowerCase()));$('#' + getclientId('txtReviewersComments')).attr('disabled', !($('.i_Outcome').find('option:selected').text().toLowerCase() == 'Not-Successful'.trim().toLowerCase()));SetAwardDate();SetAwardDatePicker();"); this.CallJs("$('.s_Old_Application_ID').attr('disabled', !($('.i_SubmissionStatus').find('option:selected').text().toLowerCase() == 'Re-Submission'.toLowerCase()));SetAwardDate();SetAwardDatePicker();"); //if (grantmasterdetails.grant_Master != null ) // HdnParentProjectAmount.Value = grantmasterdetails.grant_Master.Total_ChildAmount.ToString(); } catch (Exception ex) { this.MsgBox(ex.ToString()); } }
private void FillProjectDataForNewEntry() { TTSHWCFServiceClient servcl = new TTSHWCFServiceClient(); List<PI_Master> piLst = new List<PI_Master>(); List<Project_Master> pjmasterlist = new List<Project_Master>(); GrantMasterDetails grantmasterdetails = new GrantMasterDetails(); try { txtparentprojectamount.Text = "0"; txtRemainingAmount.Text = "0"; HdnParentProjectDurId.Value = "0"; HdnParentProjectAmount.Value = "0"; HdnMaxChildDurationId.Value = "0"; HdnMaxChildduration.Value = ""; grantmasterdetails = servcl.GetNewProjectDetailsForGrant(Convert.ToInt32(HdnProjectId.Value)); piLst = grantmasterdetails.Pilisst.ToList(); pjmasterlist.Add(grantmasterdetails.project); TxtProjTitle.Text = pjmasterlist.ListToDatatable().Rows[0]["s_Project_Title"].ToString(); TxtAlias1.Text = pjmasterlist.ListToDatatable().Rows[0]["s_Project_Alias1"].ToString(); TxtAlias2.Text = pjmasterlist.ListToDatatable().Rows[0]["s_Project_Alias2"].ToString(); TxtShortTitle.Text = pjmasterlist.ListToDatatable().Rows[0]["s_Short_Title"].ToString(); TxtIrbNo.Text = pjmasterlist.ListToDatatable().Rows[0]["s_IRB_No"].ToString(); //ddlProjCategory.Text = pjmasterlist.ListToDatatable().Rows[0]["Project_Category_Name"].ToString(); // ddlProjCategory.SelectedItem.Text = pjmasterlist.ListToDatatable().Rows[0]["Project_Category_Name"].ToString(); DispProjectId.InnerText = pjmasterlist.ListToDatatable().Rows[0]["s_Display_Project_ID"].ToString(); rptrPIDetails.DataSource = piLst; rptrPIDetails.DataBind(); HdnUpdateMode.Value = "0"; if (pjmasterlist[0].b_Ischild == true && pjmasterlist[0].i_Parent_ProjectID > 0) { if (grantmasterdetails.parentProject.GrantApplied) { TxtParentProjectId.Text = grantmasterdetails.parentProject.s_Display_Project_ID.ToString(); TxtParentProjectName.Text = grantmasterdetails.parentProject.s_Project_Title.ToString(); txtparentprojectamount.Text = grantmasterdetails.parentProject.Total_Amount.ToString(); txtRemainingAmount.Text = grantmasterdetails.parentProject.Remaining_Amount.ToString(); txtparentprojectduration.Text = grantmasterdetails.parentProject.s_Duration.ToString(); HdnParentProjectDurId.Value = grantmasterdetails.parentProject.i_DurationID.ToString(); } else { this.MsgBox("Please Apply grant application for Parent project first"); ShowPanel(); FillGridMain(); this.MsgBox("Please Apply grant application for Parent project first"); } } SHowParentInformation(pjmasterlist[0].b_Ischild); txtProjCategory.Text = pjmasterlist[0].Project_Category_Name.ToString(); // this.CallJs("$('.s_Old_Application_ID').attr('disabled', !($('.i_SubmissionStatus').find('option:selected').text().toLowerCase() == 'Re-Submission'.toLowerCase()));$('#' + getclientId('txtReviewersComments')).attr('disabled', !($('.i_Outcome').find('option:selected').text().toLowerCase() == 'Not-Successful'.trim().toLowerCase()));SetAwardDate();SetAwardDatePicker();"); this.CallJs("$('.s_Old_Application_ID').attr('disabled', !($('.i_SubmissionStatus').find('option:selected').text().toLowerCase() == 'Re-Submission'.toLowerCase()));SetAwardDate();SetAwardDatePicker();"); //if (grantmasterdetails.grant_Master != null ) // HdnParentProjectAmount.Value = grantmasterdetails.grant_Master.Total_ChildAmount.ToString(); } catch (Exception ex) { this.MsgBox(ex.ToString()); } }
private void FillControl() { TTSHWCFServiceClient cl = new TTSHWCFServiceClient(); Grant_Master grant_Master = new Grant_Master(); List <PI_Master> piLst = new List <PI_Master>(); List <Project_Master> pjmasterlist = new List <Project_Master>(); GrantMasterDetails grantmasterdetails = new GrantMasterDetails(); try { grantmasterdetails = cl.GetGrantApplicationDetails(Convert.ToInt32(HdnGrantId.Value)); grant_Master = grantmasterdetails.grant_Master; txtparentprojectamount.Text = "0"; txtRemainingAmount.Text = "0"; HdnParentProjectDurId.Value = "0"; HdnParentProjectAmount.Value = "0"; HdnMaxChildDurationId.Value = "0"; HdnMaxChildduration.Value = ""; if (grant_Master != null) { HdnProjectId.Value = grant_Master.i_Project_ID.ToString(); TxtApplicationId.Text = grant_Master.s_Application_ID.ToString(); ddlGrantType.SelectedValue = grant_Master.i_GrantType_ID.ToString(); ddlGrantType_SelectedIndexChanged(null, EventArgs.Empty); ddlGrantSubType1.SelectedValue = grant_Master.i_Grant_SubType_ID.ToString(); ddlGrantSubType1_SelectedIndexChanged(null, EventArgs.Empty); ddlGrantSubType2.SelectedValue = grant_Master.i_Grant_Sub_SubType_ID.ToString(); ddlGrantSubType2_SelectedIndexChanged(null, EventArgs.Empty); ddlGrantSubType3.SelectedValue = grant_Master.i_Grant_Sub_Sub_SubType_ID.ToString(); TxtAmountRequested.Text = grant_Master.i_Amount_Requested.ToString(); TxtClolsingDate.Text = grant_Master.dt_Closing_Date.HasValue? grant_Master.dt_Closing_Date.Value.ToString("dd-MMM-yyyy"):""; TxtMentor.Text = grant_Master.s_Mentor.ToString(); ddlGrantAwardOrgan.SelectedValue = grant_Master.i_AwardOrganization.ToString(); ddlOutCome.SelectedValue = grant_Master.i_Outcome.ToString(); if (grant_Master.dt_AwardDate.HasValue) { TxtAwardLetter.Text = grant_Master.dt_AwardDate.Value.ToString("dd-MMM-yyyy"); hidAwardLetter.Value = TxtAwardLetter.Text; } if (grant_Master.dt_ApplicationDate.HasValue) { TxtGrantAppDate.Text = grant_Master.dt_ApplicationDate.Value.ToString("dd-MMM-yyyy"); } TxtOldApplicationId.Text = grant_Master.s_Old_Application_ID.ToString(); ddlSubmissionStatus.SelectedValue = grant_Master.i_SubmissionStatus.ToString(); if (grant_Master.s_Duration.CheckInt()) { ddlDuration.SelectedValue = grant_Master.s_Duration.ToString(); } txtFTe.Text = grant_Master.i_FTE.ToString(); txtReviewersComments.Text = grant_Master.s_Reviewers_Comments.ToString(); piLst = grantmasterdetails.Pilisst.ToList(); pjmasterlist.Add(grantmasterdetails.project); txtGrantrName.Text = grant_Master.s_Grant_Name.ToString(); if (grant_Master.i_AwardCountryID > 0) { txtCountryName.Text = grant_Master.CountryName.ToString(); HdnCountryId.Value = grant_Master.i_AwardCountryID.ToString(); } if (Convert.ToDecimal(grant_Master.Total_ChildAmount.ToString()) > 0) { HdnParentProjectAmount.Value = grant_Master.Total_ChildAmount.ToString(); } TxtProjTitle.Text = pjmasterlist.ListToDatatable().Rows[0]["s_Project_Title"].ToString(); TxtAlias1.Text = pjmasterlist.ListToDatatable().Rows[0]["s_Project_Alias1"].ToString(); TxtAlias2.Text = pjmasterlist.ListToDatatable().Rows[0]["s_Project_Alias2"].ToString(); TxtShortTitle.Text = pjmasterlist.ListToDatatable().Rows[0]["s_Short_Title"].ToString(); TxtIrbNo.Text = pjmasterlist.ListToDatatable().Rows[0]["s_IRB_No"].ToString(); //ddlProjCategory.SelectedItem.Text = pjmasterlist.ListToDatatable().Rows[0]["Project_Category_Name"].ToString(); txtProjCategory.Text = pjmasterlist[0].Project_Category_Name.ToString(); DispProjectId.InnerText = pjmasterlist.ListToDatatable().Rows[0]["s_Display_Project_ID"].ToString(); rptrPIDetails.DataSource = piLst; rptrPIDetails.DataBind(); HdnUpdateMode.Value = "1"; if (pjmasterlist[0].b_Ischild == true && pjmasterlist[0].i_Parent_ProjectID > 0) { if (grantmasterdetails.parentProject.GrantApplied) { TxtParentProjectId.Text = grantmasterdetails.parentProject.s_Display_Project_ID.ToString(); TxtParentProjectName.Text = grantmasterdetails.parentProject.s_Project_Title.ToString(); txtparentprojectamount.Text = grantmasterdetails.parentProject.Total_Amount.ToString(); txtRemainingAmount.Text = grantmasterdetails.parentProject.Remaining_Amount.ToString(); txtparentprojectduration.Text = grantmasterdetails.parentProject.s_Duration.ToString(); HdnParentProjectDurId.Value = grantmasterdetails.parentProject.i_DurationID.ToString(); txtRemainingAmount.Text = Convert.ToString(Convert.ToDouble(grantmasterdetails.parentProject.Remaining_Amount) + Convert.ToDouble(grant_Master.i_Amount_Requested)); } else { CallJS("MessageBox('Parent project Not Applied For The Grant.');"); ShowPanel(); FillGridMain(); } } HdnMaxChildDurationId.Value = grant_Master.i_Child_DurationID.ToString(); HdnMaxChildduration.Value = grant_Master.s_Child_Duration.ToString(); SHowParentInformation(pjmasterlist[0].b_Ischild); //this.CallJs("$('.s_Old_Application_ID').attr('disabled', !($('.i_SubmissionStatus').find('option:selected').text().toLowerCase() == 'Re-Submission'.toLowerCase()));$('#' + getclientId('txtReviewersComments')).attr('disabled', !($('.i_Outcome').find('option:selected').text().toLowerCase() == 'Not-Successful'.trim().toLowerCase()));SetAwardDate();SetAwardDatePicker();"); this.CallJs("$('.s_Old_Application_ID').attr('disabled', !($('.i_SubmissionStatus').find('option:selected').text().toLowerCase() == 'Re-Submission'.toLowerCase()));SetAwardDate();SetAwardDatePicker();"); if (grantmasterdetails.grant_Master != null) { HdnParentProjectAmount.Value = grantmasterdetails.grant_Master.Total_ChildAmount.ToString(); } } } catch (Exception ex) { this.MsgBox(ex.Message.ToString()); } }
private void FillControl() { TTSHWCFServiceClient cl = new TTSHWCFServiceClient(); Grant_Master grant_Master = new Grant_Master(); List<PI_Master> piLst = new List<PI_Master>(); List<Project_Master> pjmasterlist = new List<Project_Master>(); GrantMasterDetails grantmasterdetails = new GrantMasterDetails(); try { grantmasterdetails = cl.GetGrantApplicationDetails(Convert.ToInt32(HdnGrantId.Value)); grant_Master = grantmasterdetails.grant_Master; txtparentprojectamount.Text = "0"; txtRemainingAmount.Text = "0"; HdnParentProjectDurId.Value = "0"; HdnParentProjectAmount.Value = "0"; HdnMaxChildDurationId.Value = "0"; HdnMaxChildduration.Value = ""; if (grant_Master != null) { HdnProjectId.Value = grant_Master.i_Project_ID.ToString(); TxtApplicationId.Text = grant_Master.s_Application_ID.ToString(); ddlGrantType.SelectedValue = grant_Master.i_GrantType_ID.ToString(); ddlGrantType_SelectedIndexChanged(null, EventArgs.Empty); ddlGrantSubType1.SelectedValue = grant_Master.i_Grant_SubType_ID.ToString(); ddlGrantSubType1_SelectedIndexChanged(null, EventArgs.Empty); ddlGrantSubType2.SelectedValue = grant_Master.i_Grant_Sub_SubType_ID.ToString(); ddlGrantSubType2_SelectedIndexChanged(null, EventArgs.Empty); ddlGrantSubType3.SelectedValue = grant_Master.i_Grant_Sub_Sub_SubType_ID.ToString(); TxtAmountRequested.Text = grant_Master.i_Amount_Requested.ToString(); TxtClolsingDate.Text =grant_Master.dt_Closing_Date.HasValue? grant_Master.dt_Closing_Date.Value.ToString("dd-MMM-yyyy"):""; TxtMentor.Text = grant_Master.s_Mentor.ToString(); ddlGrantAwardOrgan.SelectedValue = grant_Master.i_AwardOrganization.ToString(); ddlOutCome.SelectedValue = grant_Master.i_Outcome.ToString(); if (grant_Master.dt_AwardDate.HasValue) { TxtAwardLetter.Text = grant_Master.dt_AwardDate.Value.ToString("dd-MMM-yyyy"); hidAwardLetter.Value = TxtAwardLetter.Text; } if (grant_Master.dt_ApplicationDate.HasValue) { TxtGrantAppDate.Text = grant_Master.dt_ApplicationDate.Value.ToString("dd-MMM-yyyy"); } TxtOldApplicationId.Text = grant_Master.s_Old_Application_ID.ToString(); ddlSubmissionStatus.SelectedValue = grant_Master.i_SubmissionStatus.ToString(); if (grant_Master.s_Duration.CheckInt()) ddlDuration.SelectedValue = grant_Master.s_Duration.ToString(); txtFTe.Text = grant_Master.i_FTE.ToString(); txtReviewersComments.Text = grant_Master.s_Reviewers_Comments.ToString(); piLst = grantmasterdetails.Pilisst.ToList(); pjmasterlist.Add(grantmasterdetails.project); txtGrantrName.Text = grant_Master.s_Grant_Name.ToString(); if (grant_Master.i_AwardCountryID>0){ txtCountryName.Text = grant_Master.CountryName.ToString(); HdnCountryId.Value = grant_Master.i_AwardCountryID.ToString(); } if (Convert.ToDecimal(grant_Master.Total_ChildAmount.ToString()) > 0) HdnParentProjectAmount.Value = grant_Master.Total_ChildAmount.ToString(); TxtProjTitle.Text = pjmasterlist.ListToDatatable().Rows[0]["s_Project_Title"].ToString(); TxtAlias1.Text = pjmasterlist.ListToDatatable().Rows[0]["s_Project_Alias1"].ToString(); TxtAlias2.Text = pjmasterlist.ListToDatatable().Rows[0]["s_Project_Alias2"].ToString(); TxtShortTitle.Text = pjmasterlist.ListToDatatable().Rows[0]["s_Short_Title"].ToString(); TxtIrbNo.Text = pjmasterlist.ListToDatatable().Rows[0]["s_IRB_No"].ToString(); //ddlProjCategory.SelectedItem.Text = pjmasterlist.ListToDatatable().Rows[0]["Project_Category_Name"].ToString(); txtProjCategory.Text = pjmasterlist[0].Project_Category_Name.ToString(); DispProjectId.InnerText = pjmasterlist.ListToDatatable().Rows[0]["s_Display_Project_ID"].ToString(); rptrPIDetails.DataSource = piLst; rptrPIDetails.DataBind(); HdnUpdateMode.Value = "1"; if (pjmasterlist[0].b_Ischild == true && pjmasterlist[0].i_Parent_ProjectID > 0) { if (grantmasterdetails.parentProject.GrantApplied) { TxtParentProjectId.Text = grantmasterdetails.parentProject.s_Display_Project_ID.ToString(); TxtParentProjectName.Text = grantmasterdetails.parentProject.s_Project_Title.ToString(); txtparentprojectamount.Text = grantmasterdetails.parentProject.Total_Amount.ToString(); txtRemainingAmount.Text = grantmasterdetails.parentProject.Remaining_Amount.ToString(); txtparentprojectduration.Text = grantmasterdetails.parentProject.s_Duration.ToString(); HdnParentProjectDurId.Value = grantmasterdetails.parentProject.i_DurationID.ToString(); txtRemainingAmount.Text = Convert.ToString(Convert.ToDouble(grantmasterdetails.parentProject.Remaining_Amount) + Convert.ToDouble(grant_Master.i_Amount_Requested)); } else { CallJS("MessageBox('Parent project Not Applied For The Grant.');"); ShowPanel(); FillGridMain(); } } HdnMaxChildDurationId.Value = grant_Master.i_Child_DurationID.ToString(); HdnMaxChildduration.Value = grant_Master.s_Child_Duration.ToString(); SHowParentInformation(pjmasterlist[0].b_Ischild); //this.CallJs("$('.s_Old_Application_ID').attr('disabled', !($('.i_SubmissionStatus').find('option:selected').text().toLowerCase() == 'Re-Submission'.toLowerCase()));$('#' + getclientId('txtReviewersComments')).attr('disabled', !($('.i_Outcome').find('option:selected').text().toLowerCase() == 'Not-Successful'.trim().toLowerCase()));SetAwardDate();SetAwardDatePicker();"); this.CallJs("$('.s_Old_Application_ID').attr('disabled', !($('.i_SubmissionStatus').find('option:selected').text().toLowerCase() == 'Re-Submission'.toLowerCase()));SetAwardDate();SetAwardDatePicker();"); if (grantmasterdetails.grant_Master != null) HdnParentProjectAmount.Value = grantmasterdetails.grant_Master.Total_ChildAmount.ToString(); } } catch (Exception ex) { this.MsgBox(ex.Message.ToString()); } }