protected void btnSave_Click(object sender, EventArgs e) { try { if (grdTameli.SelectedIndex < 0) { lblStatusMessage.Text = "Select Tameli To Be Processed"; this.programmaticModalPopup.Show(); return; } if (txtVerifiedDate.Text == "____/__/__" || txtVerifiedDate.Text.Trim() == "") { lblStatusMessage.Text = "Verified Date Missing"; this.programmaticModalPopup.Show(); return; } if (rdblstVerify.SelectedIndex < 0) { lblStatusMessage.Text = "Select Verify Yes/No"; this.programmaticModalPopup.Show(); return; } ATTTameli tamProcess = new ATTTameli(); ATTTameliSearch tamSearch = TameliProcesss[grdTameli.SelectedIndex]; tamProcess.CaseID = tamSearch.CaseID; tamProcess.LitigantID = tamSearch.LitigantID; tamProcess.IssuedDate = tamSearch.IssuedDate; tamProcess.SeqNo = tamSearch.SeqNo; tamProcess.VerifiedDate = txtVerifiedDate.Text.Trim(); tamProcess.VerifiedBy = userID; tamProcess.VerifiedYesNo = (rdblstVerify.SelectedIndex == 0) ? "Y" : "N"; tamProcess.VerifiedRemarks = txtRemarks.Text.ToString(); if (BLLTameli.ProcessTameli(tamProcess)) { lblStatusMessage.Text = "Tameli Processed Successfully"; this.programmaticModalPopup.Show(); } else { lblStatusMessage.Text = "Problem Occured"; this.programmaticModalPopup.Show(); } ClearControls(true, true); } catch (Exception ex) { lblStatusMessage.Text = "Select Tameli To Be Processed " + ex.Message.ToString(); this.programmaticModalPopup.Show(); } }
protected void grdTameli_RowDeleting(object sender, GridViewDeleteEventArgs e) { try { ATTTameli tam = new ATTTameli(); List <ATTTameli> tamlstt = new List <ATTTameli>(); tam.CaseID = TameliSend[e.RowIndex].CaseID; tam.LitigantID = TameliSend[e.RowIndex].LitigantID; tam.IssuedDate = TameliSend[e.RowIndex].IssuedDate; tam.SeqNo = TameliSend[e.RowIndex].SeqNo; tam.Action = "D"; ATTTameliMedia tamMed = new ATTTameliMedia(); List <ATTTameliMedia> tamMedlstt = new List <ATTTameliMedia>(); tamMed.CaseID = TameliSend[e.RowIndex].CaseID; tamMed.LitigantID = TameliSend[e.RowIndex].LitigantID; tamMed.IssueDate = TameliSend[e.RowIndex].IssuedDate; tamMed.SeqNo = TameliSend[e.RowIndex].SeqNo; tamMed.Action = "D"; tamMedlstt.Add(tamMed); tam.TameliMediaLIST = tamMedlstt; ATTTameliWitnessPerson tamWitPerson = new ATTTameliWitnessPerson(); List <ATTTameliWitnessPerson> tamWitPersonlstt = new List <ATTTameliWitnessPerson>(); tamWitPerson.CaseID = TameliSend[e.RowIndex].CaseID; tamWitPerson.LitigantID = TameliSend[e.RowIndex].LitigantID; tamWitPerson.IssuedDate = TameliSend[e.RowIndex].IssuedDate; tamWitPerson.SeqNo = TameliSend[e.RowIndex].SeqNo; tamWitPerson.Action = "D"; tamWitPersonlstt.Add(tamWitPerson); tam.TameliWitnessPersonLIST = tamWitPersonlstt; tamlstt.Add(tam); BLLTameli.AddEditDeleteTameli(tamlstt); LoadTameliList(); ClearControls(); } catch (Exception ex) { lblStatusMessage.Text = "Tameli Could Not Be Deleted" + ex.Message.ToString(); programmaticModalPopup.Show(); } }
protected void btnAssign_Click(object sender, EventArgs e) { try { if (grdAssignTamildaar.SelectedIndex == -1) { lblStatusMessage.Text = "Select Tameli"; programmaticModalPopup.Show(); return; } if (grdTamilDaar.SelectedIndex == -1) { lblStatusMessage.Text = "Select Tamildaar"; programmaticModalPopup.Show(); return; } if (txtamilDaarReceivedDate1.Text.Trim() == "" || txtamilDaarReceivedDate1.Text == "____/__/__") { lblStatusMessage.Text = "Tamildaar Received Date missing"; programmaticModalPopup.Show(); return; } List <ATTTameliSearch> lst = TameliAssignTamildaar; ATTTameli obj = new ATTTameli(); obj.CaseID = lst[grdAssignTamildaar.SelectedIndex].CaseID; obj.LitigantID = lst[grdAssignTamildaar.SelectedIndex].LitigantID; obj.IssuedDate = lst[grdAssignTamildaar.SelectedIndex].IssuedDate; obj.SeqNo = lst[grdAssignTamildaar.SelectedIndex].SeqNo; obj.ReceivedBy = int.Parse(grdTamilDaar.SelectedRow.Cells[1].Text); obj.ReceivedDate = txtamilDaarReceivedDate1.Text.Trim(); BLLTameli.AssignTamildaar(obj); lblStatusMessage.Text = "TamilDaar Assigned"; programmaticModalPopup.Show(); } catch (Exception ex) { lblStatusMessage.Text = "TamilDaar Couldn't be Assigned" + ex.Message; programmaticModalPopup.Show(); } ClearTameliAssign(); }
protected void grdTam_RowDeleting(object sender, GridViewDeleteEventArgs e) { try { ATTTameli tam = new ATTTameli(); tam.CaseID = TameliProcesss[e.RowIndex].CaseID; tam.LitigantID = TameliProcesss[e.RowIndex].LitigantID; tam.IssuedDate = TameliProcesss[e.RowIndex].IssuedDate; tam.SeqNo = TameliProcesss[e.RowIndex].SeqNo; tam.TameliDate = null; tam.TameliYesNo = null; tam.SecClrkRcvdDate = null; tam.TamilDaarRemrks = null; tam.TameliStatusID = null; ATTTameliWitnessPerson TamWitPerson = new ATTTameliWitnessPerson(); TamWitPerson.CaseID = tam.CaseID; TamWitPerson.LitigantID = tam.LitigantID; TamWitPerson.IssuedDate = tam.IssuedDate; TamWitPerson.SeqNo = tam.SeqNo; TamWitPerson.Action = "D"; tam.TameliWitnessPersonLIST.Clear(); tam.TameliWitnessPersonLIST.Add(TamWitPerson); BLLTameli.SaveTamelildaarFeedBack(tam); LoadTameliList(); ClearControls(); LoadDeleteData(); } catch (Exception ex) { lblStatusMessage.Text = "Tameli Could Not Be Deleted" + ex.Message.ToString(); programmaticModalPopup.Show(); } }
protected void btnSave_Click(object sender, EventArgs e) { try { if (ddlTameliType.SelectedIndex < 1) { lblStatusMessage.Text = "तामेलीको किसिम छान्नुहोस्"; this.programmaticModalPopup.Show(); return; } if (txtIssuedDate.Text == "____/__/__") { lblStatusMessage.Text = "जारी मिति छुट्यो"; this.programmaticModalPopup.Show(); return; } if (ddlMyaadType.SelectedIndex < 1) { lblStatusMessage.Text = "म्यादको किसिम छान्नुहोस्"; this.programmaticModalPopup.Show(); return; } if (ddlTameliType.SelectedIndex == 1) { if (txtTameliMedia.Text.Trim() == "") { lblStatusMessage.Text = "तामेलि माद्यम छुट्यो"; this.programmaticModalPopup.Show(); return; } if (txtPublicationDate.Text.Trim() == "") { lblStatusMessage.Text = "प्रकाशन मिति छुट्यो"; this.programmaticModalPopup.Show(); return; } } else if (ddlTameliType.SelectedIndex == 2) { if (grdEmpSearch.SelectedIndex < 0) { lblStatusMessage.Text = "तामिलदार छान्नुहोस्"; this.programmaticModalPopup.Show(); return; } } else if (ddlTameliType.SelectedIndex == 3) { if (ddlCourt.SelectedIndex < 1) { lblStatusMessage.Text = "अदालात छान्नुहोस्"; this.programmaticModalPopup.Show(); return; } } //if (ddlTameliType.SelectedIndex > 1) //{ // if (txtTameliWitnessPerson.Text.Trim() == "") // { // lblStatusMessage.Text = "तामेलिको साक्षिको नाम छुट्यो"; // this.programmaticModalPopup.Show(); // return; // } // if (txtPost.Text.Trim() == "") // { // lblStatusMessage.Text = "तामेलिको साक्षिको पद छुट्यो"; // this.programmaticModalPopup.Show(); // return; // } //} List <ATTTameli> lstTameliSave = new List <ATTTameli>(); foreach (GridViewRow grow in grdLitigantsApp.Rows) { if (((CheckBox)grow.FindControl("chk")).Checked) { ATTTameli obj = new ATTTameli(); obj.CaseID = int.Parse(grow.Cells[1].Text.Trim()); obj.LitigantID = int.Parse(grow.Cells[2].Text.Trim()); obj.SeqNo = 0; // // lstTameliSave.Add(obj); } foreach (GridViewRow grow1 in ((GridView)grow.FindControl("grdAttorney1")).Rows) { if (((CheckBox)grow1.FindControl("chk")).Checked) { ATTTameli obj = new ATTTameli(); obj.CaseID = int.Parse(grow1.Cells[0].Text.Trim()); obj.LitigantID = int.Parse(grow1.Cells[1].Text.Trim()); obj.SeqNo = 0; obj.AttorneyID = int.Parse(grow1.Cells[2].Text.Trim()); // // lstTameliSave.Add(obj); } } foreach (GridViewRow grow1 in ((GridView)grow.FindControl("grdTamWitPerson1")).Rows) { if (((CheckBox)grow1.FindControl("chk")).Checked) { ATTTameli obj = new ATTTameli(); obj.CaseID = int.Parse(grow1.Cells[0].Text.Trim()); obj.LitigantID = int.Parse(grow1.Cells[1].Text.Trim()); obj.SeqNo = 0; obj.WitnessID = int.Parse(grow1.Cells[2].Text.Trim()); // // lstTameliSave.Add(obj); } } } foreach (GridViewRow grow in grdLitigantRes.Rows) { if (((CheckBox)grow.FindControl("chkRes")).Checked) { ATTTameli obj = new ATTTameli(); obj.CaseID = int.Parse(grow.Cells[1].Text.Trim()); obj.LitigantID = int.Parse(grow.Cells[2].Text.Trim()); obj.SeqNo = 0; // // lstTameliSave.Add(obj); } foreach (GridViewRow grow1 in ((GridView)grow.FindControl("grdAttorney")).Rows) { if (((CheckBox)grow1.FindControl("chk")).Checked) { ATTTameli obj = new ATTTameli(); obj.CaseID = int.Parse(grow1.Cells[0].Text.Trim()); obj.LitigantID = int.Parse(grow1.Cells[1].Text.Trim()); obj.SeqNo = 0; obj.AttorneyID = int.Parse(grow1.Cells[2].Text.Trim()); // // lstTameliSave.Add(obj); } } foreach (GridViewRow grow1 in ((GridView)grow.FindControl("grdTamWitPerson")).Rows) { if (((CheckBox)grow1.FindControl("chk")).Checked) { ATTTameli obj = new ATTTameli(); obj.CaseID = int.Parse(grow1.Cells[0].Text.Trim()); obj.LitigantID = int.Parse(grow1.Cells[1].Text.Trim()); obj.SeqNo = 0; obj.WitnessID = int.Parse(grow1.Cells[2].Text.Trim()); // // lstTameliSave.Add(obj); } } } if (lstTameliSave.Count < 1) { lblStatusMessage.Text = "No person Selected For Tameli"; this.programmaticModalPopup.Show(); return; } else { foreach (ATTTameli obj in lstTameliSave) { obj.IssuedDate = txtIssuedDate.Text; obj.IssuedBy = userID; obj.TameliTypeID = int.Parse(ddlTameliType.SelectedValue); obj.MyaadTypeID = MyaadType[ddlMyaadType.SelectedIndex].MyaadTypeID; obj.Action = "A"; obj.EntryBy = entryBy; if (ddlTameliType.SelectedIndex == 1) { ATTTameliMedia tameliMedia = new ATTTameliMedia(); tameliMedia.CaseID = obj.CaseID; tameliMedia.LitigantID = obj.LitigantID; tameliMedia.IssueDate = obj.IssuedDate; tameliMedia.MediaFullName = txtTameliMedia.Text.Trim(); tameliMedia.MediaPublicationDate = txtPublicationDate.Text.Trim(); tameliMedia.EntryBy = entryBy; tameliMedia.Action = "A"; obj.TameliMediaLIST.Add(tameliMedia); } else if (ddlTameliType.SelectedIndex == 2) { if (grdTamilDaar.SelectedIndex < 0) { lblStatusMessage.Text = "तामिलदार छान्नुहोस्"; this.programmaticModalPopup.Show(); return; }//ReceivedBy is Tamildaar ID obj.ReceivedBy = int.Parse(grdTamilDaar.Rows[grdTamilDaar.SelectedIndex].Cells[1].Text); obj.ReceivedDate = txtTamildaarReceivedDate.Text.Trim(); } else if (ddlTameliType.SelectedIndex == 3) { obj.TameliOrg = int.Parse(ddlCourt.SelectedValue); } ////// add Tameli witness person //if (ddlTameliType.SelectedIndex > 1) //{ // ATTTameliWitnessPerson TamWitPerson = new ATTTameliWitnessPerson(); // TamWitPerson.CaseID = obj.CaseID; // TamWitPerson.LitigantID = obj.LitigantID; // TamWitPerson.IssuedDate = obj.IssuedDate; // TamWitPerson.FullName = txtTameliWitnessPerson.Text.Trim(); // TamWitPerson.Post = txtPost.Text.Trim(); // TamWitPerson.Action = "A"; // TamWitPerson.EntryBy = entryBy; // obj.TameliWitnessPersonLIST.Add(TamWitPerson); //} /////// } } BLLTameli.AddEditDeleteTameli(lstTameliSave); lblStatusMessage.Text = "Data Saved Successfully"; this.programmaticModalPopup.Show(); } catch (Exception ex) { lblStatusMessage.Text = "Problem Saving Data " + ex.Message; this.programmaticModalPopup.Show(); } ClearControls(); LoadTameliList(); }
protected void btnSave_Click(object sender, EventArgs e) { try { if (grdTameli.SelectedIndex < 0) { lblStatusMessage.Text = "Select Tameli To Be Processed"; this.programmaticModalPopup.Show(); return; } if (txtTameliDate.Text == "____/__/__" || txtTameliDate.Text.Trim() == "") { lblStatusMessage.Text = "Tameli Date Missing"; this.programmaticModalPopup.Show(); return; } if (txtSecClrkRcvdDate.Text == "____/__/__" || txtSecClrkRcvdDate.Text.Trim() == "") { lblStatusMessage.Text = "SectionClerk Received Date Missing"; this.programmaticModalPopup.Show(); return; } if (rdblstTameliSuccess.SelectedIndex < 0) { lblStatusMessage.Text = "Choose Success Yes/No"; this.programmaticModalPopup.Show(); return; } else if (rdblstTameliSuccess.SelectedIndex == 0) { if (ddlTameliStatus.SelectedIndex < 1) { lblStatusMessage.Text = "Select Tameli Status"; this.programmaticModalPopup.Show(); return; } //if (ddlTameliStatus.SelectedIndex == 1) //{ // if (true) // { //if (txtTameliWitnessPerson.Text.Trim() == "") //{ // lblStatusMessage.Text = "Tameli Witness Person Missing"; // this.programmaticModalPopup.Show(); // return; //} //if (txtPost.Text.Trim() == "") //{ // lblStatusMessage.Text = "Post of Tameli Witness Person Missing"; // this.programmaticModalPopup.Show(); // return; //} // } //} } ATTTameli tamProcess = new ATTTameli(); ATTTameliSearch tamSearch = TameliSend[grdTameli.SelectedIndex]; tamProcess.CaseID = tamSearch.CaseID; tamProcess.LitigantID = tamSearch.LitigantID; tamProcess.IssuedDate = tamSearch.IssuedDate; tamProcess.SeqNo = tamSearch.SeqNo; tamProcess.TameliDate = txtTameliDate.Text.Trim(); tamProcess.SecClrkRcvdDate = txtSecClrkRcvdDate.Text.Trim(); tamProcess.TameliYesNo = rdblstTameliSuccess.SelectedValue; tamProcess.TameliStatusID = int.Parse(ddlTameliStatus.SelectedValue); //tamProcess.TameliStatusID = (tamProcess.TameliYesNo == "Y") ? int.Parse(ddlTameliStatus.SelectedValue) : null; tamProcess.TamilDaarRemrks = txtTameliRemarks.Text.ToString(); //if (tamProcess.TameliStatusID==1) if (tamProcess.TameliYesNo == "Y") { List <ATTTameliWitnessPerson> lst = TameliWitnessPers; foreach (ATTTameliWitnessPerson var in lst) { var.CaseID = tamProcess.CaseID; var.LitigantID = tamProcess.LitigantID; var.IssuedDate = tamProcess.IssuedDate; var.SeqNo = tamProcess.SeqNo; var.Action = "A"; var.EntryBy = entryBy; } tamProcess.TameliWitnessPersonLIST = lst; } if (BLLTameli.SaveTamelildaarFeedBack(tamProcess)) { lblStatusMessage.Text = "Tameli Processed Successfully"; this.programmaticModalPopup.Show(); } else { lblStatusMessage.Text = "Problem Occured"; this.programmaticModalPopup.Show(); } ClearSession(); LoadTameliList(); ClearControls(); LoadDeleteData(); } catch (Exception ex) { lblStatusMessage.Text = "Select Tameli To Be Processed " + ex.Message.ToString(); this.programmaticModalPopup.Show(); } }