public ActionResult AddReceipt(int?id)
        {
            if (Session["LOGGEDIN"] != null)
            {
                objvoucherVM = new LP_Voucher_ViewModel();
                if (objvoucherVM.idx > 0)
                {
                }
                else
                {
                    thirdTier_BLL subheadBLL = new thirdTier_BLL();
                    var           allSubhead = subheadBLL.ViewAll();
                    objvoucherVM.vouchertypelist = Helper.ConvertDataTable <thirdTier_Property>(subheadBLL.ViewAll());
                    objvoucherVM.date_created    = DateTime.Now;
                    //objvoucherVM.vouchertypelist = Helper.ConvertDataTable<LP_Transaction_Type_Property>(GetAllTransactionType());
                    objvoucherVM.voucher_amount = 0.00m;
                    objvoucherVM.description    = "";
                    objvoucherVM.banklist       = Helper.ConvertDataTable <Company_Bank_Property>(GetAllCompanyBanks());
                    objvoucherVM.customerlist   = Helper.ConvertDataTable <Customers_Property>(GetAllCustomers());

                    LP_GenerateTransNumber_Property objtransnumber = new LP_GenerateTransNumber_Property();
                    objtransnumber.TableName         = "Voucher";
                    objtransnumber.Identityfieldname = "idx";
                    objtransnumber.userid            = Session["UID"].ToString();
                    objVoucherBll           = new LP_Voucher_BLL();
                    objvoucherVM.voucher_no = objVoucherBll.GenerateTransNo(objtransnumber);
                }

                return(View("_AddReceipt", objvoucherVM));
            }
            else
            {
                return(RedirectToAction("Login", "Account"));
            }
        }
예제 #2
0
 public ActionResult AddNew(int?id)
 {
     if (Session["LOGGEDIN"] != null)
     {
         objfourthTierproperty = new fourthTier_Property();
         //objBanlBLL = new Bank_BLL();
         //firstTier_Property headAccounts = new firstTier_Property() ;
         thirdTier_BLL headAccountBLL = new thirdTier_BLL();
         var           data           = headAccountBLL.ViewAll();
         objfourthTierproperty.headLST = Helper.ConvertDataTable <thirdTier_Property>(data);
         try
         {
             if (id > 0)
             {
                 objfourthTierproperty.idx = Convert.ToInt32(id);
                 objfourthTierbll          = new fourthTier_BLL(objfourthTierproperty);
                 var dt = objfourthTierbll.GetfourthTierById();
                 objfourthTierproperty.subHeadIdx    = int.Parse(dt.Rows[0]["subHeadIdx"].ToString());
                 objfourthTierproperty.childHeadName = dt.Rows[0]["childHeadName"].ToString();
             }
             else
             {
             }
         }
         catch (Exception ex)
         {
         }
         return(PartialView("_AddNew", objfourthTierproperty));
     }
     else
     {
         return(RedirectToAction("Login", "Account"));
     }
 }
예제 #3
0
 public JsonResult GetAllthirdTiers()
 {
     if (Session["LOGGEDIN"] != null)
     {
         try
         {
             objthirdTierbll = new thirdTier_BLL(objthirdTierproperty);
             var Data = JsonConvert.SerializeObject(objthirdTierbll.ViewAll());
             return(Json(new { data = Data, success = true, statuscode = 200, count = Data.Length }, JsonRequestBehavior.AllowGet));
         }
         catch (Exception ex)
         {
             return(Json(new { data = ex.Message, success = false, statuscode = 400, count = 0 }, JsonRequestBehavior.AllowGet));
         }
     }
     else
     {
         return(Json(new { data = "Session Expired", success = false, statuscode = 400, count = 0 }, JsonRequestBehavior.AllowGet));
     }
 }
      public ActionResult AddVoucher(int?id)
      {
          if (Session["LOGGEDIN"] != null)
          {
              objvoucherVM = new LP_Voucher_ViewModel();
              if (objvoucherVM.idx > 0)
              {
              }
              else
              {
                  LP_PInvoice_BLL objbll = new LP_PInvoice_BLL();
                  objvoucherVM.PInvoiceLST = Helper.ConvertDataTable <LP_P_Invoice_Property>(objbll.SelectAll()); //JsonConvert.SerializeObject(GetAllPIByDate(objsearchPI));
                  thirdTier_BLL subheadBLL = new thirdTier_BLL();
                  var           allSubhead = subheadBLL.ViewAll();
                  objvoucherVM.date_created = DateTime.Now;

                  objvoucherVM.vouchertypelist = Helper.ConvertDataTable <thirdTier_Property>(subheadBLL.ViewAll());
                  objvoucherVM.voucher_amount  = 0.00m;
                  objvoucherVM.description     = "";
                  objvoucherVM.banklist        = Helper.ConvertDataTable <Company_Bank_Property>(GetAllCompanyBanks());
                  objvoucherVM.vendorlist      = Helper.ConvertDataTable <Vendors_Property>(GetAllVendors());

                  LP_GenerateTransNumber_Property objtransnumber = new LP_GenerateTransNumber_Property();
                  objtransnumber.TableName         = "Voucher";
                  objtransnumber.Identityfieldname = "idx";
                  objtransnumber.userid            = Session["UID"].ToString();
                  objVoucherBll           = new LP_Voucher_BLL();
                  objvoucherVM.voucher_no = objVoucherBll.GenerateTransNo(objtransnumber);
              }

              return(View("_AddVoucher", objvoucherVM));
          }
          else
          {
              return(RedirectToAction("Login", "Account"));
          }
      }