// PUT api/FeeDeposited/5 public IHttpActionResult PutFeeDeposit(int id, FeeDeposit feedeposit) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (id != feedeposit.FeeDepositId) { return(BadRequest()); } db.Entry(feedeposit).State = EntityState.Modified; try { db.SaveChanges(); } catch (DbUpdateConcurrencyException) { if (!FeeDepositExists(id)) { return(NotFound()); } else { throw; } } return(StatusCode(HttpStatusCode.NoContent)); }
private void BindPurchasesListGrid() { int index = 0; _feeDeposit = new FeeDeposit(); List <PurchasesFeeModel> listPurchasesFee = _feeDeposit.GetPurchasesFeeList(Common.Convert_String_To_Date(dateReport.Text)); if (listPurchasesFee != null) { gridPurchasesItem.DataSource = listPurchasesFee; foreach (PurchasesFeeModel item in listPurchasesFee) { DataGridViewTextBoxCell colRegistrationNo = (DataGridViewTextBoxCell)(gridPurchasesItem.Rows[index].Cells["colRegistrationNo"]); DataGridViewTextBoxCell colReceiptNo = (DataGridViewTextBoxCell)(gridPurchasesItem.Rows[index].Cells["colReceiptNo"]); DataGridViewLinkCell colPrint = (DataGridViewLinkCell)(gridPurchasesItem.Rows[index].Cells["colPrint"]); colRegistrationNo.Value = item.RegistrationNo; colReceiptNo.Value = item.ReceiptNo; colPrint.Value = "Print"; index++; } gridPurchasesItem.ClearSelection(); } else { gridPurchasesItem.DataSource = null; } }
private List <Fee_Deposit_By_Date_View_Model> Get_Fee_Deposit_By_Date(DateTime Fee_Deposit_Date) { FeeDeposit feeDeposit = new FeeDeposit(); List <Fee_Deposit_By_Date_View_Model> list_Deposit_Fee = feeDeposit.Get_Fee_Deposit_By_Date(Fee_Deposit_Date); return(list_Deposit_Fee); }
private bool ISDuplicateItemInDB() { _feeDeposit = new FeeDeposit(); return(_feeDeposit.CheckDuplicatePurchasesFee( studentID, Convert.ToInt16(ddlFeeType.SelectedValue), Common.Convert_String_To_Date(dtpPurchasesDate.Text) )); }
public IHttpActionResult PostFeeDeposit(FeeDeposit feedeposit) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } db.FeeDeposits.Add(feedeposit); db.SaveChanges(); return(CreatedAtRoute("DefaultApi", new { id = feedeposit.FeeDepositId }, feedeposit)); }
public IHttpActionResult DeleteFeeDeposit(int id) { FeeDeposit feedeposit = db.FeeDeposits.Find(id); if (feedeposit == null) { return(NotFound()); } db.FeeDeposits.Remove(feedeposit); db.SaveChanges(); return(Ok(feedeposit)); }
private void Bind_Previous_Dues_Grid(long Registration_No) { try { FeeDeposit feeDeposit = new FeeDeposit(); List <MonthlyFeeGenerateModel> listPreviousDues = new List <MonthlyFeeGenerateModel>(); listPreviousDues = feeDeposit.Get_Student_Previous_Dues_List(Registration_No); int index = 0; if (listPreviousDues != null) { //listPreviousDues = listPreviousDues.OrderBy(x => x.FeeReceiptNo).ToList(); gridPreviousDues.DataSource = listPreviousDues; foreach (MonthlyFeeGenerateModel feeDues in listPreviousDues) { DataGridViewTextBoxCell colBillNo = (DataGridViewTextBoxCell)(gridPreviousDues.Rows[index].Cells["colGridDuesBillNo"]); DataGridViewTextBoxCell colDuesAmount = (DataGridViewTextBoxCell)(gridPreviousDues.Rows[index].Cells["colGridDuesDuesAmount"]); DataGridViewTextBoxCell colFeeDate = (DataGridViewTextBoxCell)(gridPreviousDues.Rows[index].Cells["colGridDuesFeeDate"]); DataGridViewTextBoxCell col_Student_ID = (DataGridViewTextBoxCell)(gridPreviousDues.Rows[index].Cells["col_Student_ID"]); colBillNo.Value = feeDues.FeeReceiptNo; colDuesAmount.Value = feeDues.PreviousDues; colFeeDate.Value = String.Format("{0:dd-MMM-yyyy}", feeDues.FeeDate); col_Student_ID.Value = feeDues.StudentID; index++; } _totalDues = (int)listPreviousDues.Sum(x => x.PreviousDues); lblTotalDues.Text = String.Empty; lblTotalDues.Text = "Total Dues : " + Convert.ToString(_totalDues); } else { gridPreviousDues.DataSource = null; } } catch (Exception ex) { } finally { gridPreviousDues.Refresh(); gridPreviousDues.ClearSelection(); } }
private void btnSave_Click(object sender, EventArgs e) { try { if (!ValidateControl()) { return; } if (gridFeeType.Rows.Count > 0) { _feeDeposit = new FeeDeposit(); short result = _feeDeposit.SavePurchasesFee(ConvertGridToXML()); switch (result) { case 1: MessageBox.Show("Record successfully saved. ", "School", MessageBoxButtons.OK, MessageBoxIcon.Information); txtRegistrationNo.Text = string.Empty; ddlFeeType.SelectedIndex = 0; gridFeeType.DataSource = null; lblStudentNameValue.Text = string.Empty; lblClassValue.Text = string.Empty; break; case -1: MessageBox.Show("Error in saving records.", "School", MessageBoxButtons.OK, MessageBoxIcon.Information); break; } } else { MessageBox.Show("There is no record in below table. Please add items.", "School", MessageBoxButtons.OK, MessageBoxIcon.Information); } } catch (Exception ex) { MessageBox.Show("Error! Please contact to admin.", "School", MessageBoxButtons.OK, MessageBoxIcon.Information); } finally { BindPurchasesListGrid(); } }
private void Save_Fee_Details(string Fee_Details_xml) { FeeDeposit feeDeposit = new FeeDeposit(); try { short result = feeDeposit.Multiple_Receipt_Fee_Paid(Fee_Details_xml); if (result == 1) { Set_Error_Message("Records has been saved."); Bind_Previous_Dues_Grid(_registration_No); txtDepositAmount.Text = String.Empty; } } catch (Exception ex) { Set_Error_Message("Error! Please Contact To Support Team."); } }
private void Bind_Previous_Dues_Grid(long Registration_No) { try { FeeDeposit feeDeposit = new FeeDeposit(); List <MonthlyFeeDepositModel> listDepositedDues = new List <MonthlyFeeDepositModel>(); listDepositedDues = feeDeposit.Get_Student_Deposited_List(Registration_No); int index = 0; if (listDepositedDues != null) { gridDepositedFee.DataSource = listDepositedDues; foreach (MonthlyFeeDepositModel feeDues in listDepositedDues) { DataGridViewLinkCell colBillNo = (DataGridViewLinkCell)(gridDepositedFee.Rows[index].Cells["colGridDuesBillNo"]); DataGridViewTextBoxCell colDuesAmount = (DataGridViewTextBoxCell)(gridDepositedFee.Rows[index].Cells["colGridDuesDuesAmount"]); DataGridViewTextBoxCell colFeeDate = (DataGridViewTextBoxCell)(gridDepositedFee.Rows[index].Cells["colGridDuesFeeDate"]); colBillNo.Value = feeDues.FeeReceiptNo; colDuesAmount.Value = feeDues.AmountDeposit; colFeeDate.Value = String.Format("{0:dd-MMM-yyyy}", feeDues.FeeDepositDate); index++; } } else { gridDepositedFee.DataSource = null; } } catch (Exception ex) { } finally { gridDepositedFee.Refresh(); gridDepositedFee.ClearSelection(); } }
public FeeDeposit GetFeeDepositByReceiptNo(FeeDeposit FeeDepositDetails) { DALFee dal = new DALFee(ConStr); return(dal.GetFeeDepositByReceiptNo(FeeDepositDetails)); }
public List <FeeDeposit> GetFeeDeposit(FeeDeposit FeeDepositDetails) { DALFee dal = new DALFee(ConStr); return(dal.GetFeeDeposit(FeeDepositDetails)); }
public int FeeDeposit(FeeDeposit FeeDepositDetails) { DALFee dal = new DALFee(ConStr); return(dal.FeeDeposit(FeeDepositDetails)); }