public ActionResult Purchase(Purchase obj, FormCollection fc)
        {
            try
            {
                obj.ProductPurchaseID   = fc["ProductPurchaseID"].ToString();
                obj.ProductSupplierID   = fc["ProductSupplierID"].ToString();
                obj.ProductSupplierName = fc["supplierName"].ToString();
                obj.Address             = fc["address"].ToString();
                obj.SupplierRemark      = fc["SupplierRemark"].ToString();
                obj.billDate            = fc["billDate"].ToString();
                obj.BillDiscountPercent = fc["billDate"].ToString();
                obj.BillNo            = fc["billNumber"].ToString();
                obj.grossTotal        = fc["grossTotal"].ToString();
                obj.discountAmt       = fc["discountAmt"].ToString();
                obj.taxAmount         = fc["taxAmount"].ToString();
                obj.totalAmount       = fc["totalAmount"].ToString();
                obj.otherAdj          = fc["otherAdj"].ToString();
                obj.lessCreditDebit   = fc["lessCreditDebit"].ToString();
                obj.netAmount         = fc["netAmount"].ToString();
                obj.payment_type      = fc["payment_type"].ToString();
                obj.billAmount        = fc["billAmount"].ToString();
                obj.currentBalance    = fc["currentBalance"].ToString();
                obj.cheque            = fc["cheque"].ToString();
                obj.bankName          = fc["bankName"].ToString();
                obj.chequeDate        = fc["chequeDate"].ToString();
                obj.Remarks           = fc["Remarks"].ToString();
                obj.ProductID1        = fc["ProductID1"].ToString();
                obj.batchNumber1      = fc["batchNumber1"].ToString();
                obj.HSNSACCode1       = fc["HSNSACCode1"].ToString();
                obj.expiry1           = fc["expiry1"].ToString();
                obj.mrp1              = fc["mrp1"].ToString();
                obj.salesRate1        = fc["salesRate1"].ToString();
                obj.purchaseRate1     = fc["purchaseRate1"].ToString();
                obj.quantity1         = fc["quantity1"].ToString();
                obj.free1             = fc["free1"].ToString();
                obj.discount1         = fc["discount1"].ToString();
                obj.discountSymbol1   = fc["discountSymbol1"].ToString();
                obj.lessBy1           = fc["lessBy1"].ToString();
                obj.lessBySymbol1     = fc["lessBySymbol1"].ToString();
                obj.totalamount1      = fc["totalamount1"].ToString();
                obj.productName1      = fc["productName1"].ToString();
                obj.ProductDetailsID1 = fc["ProductDetailsID1"].ToString();
                obj.gst1              = fc["gst1"].ToString();
                obj.sgst1             = fc["sgst1"].ToString();
                obj.cgst1             = fc["cgst1"].ToString();
                obj.utgst1            = fc["utgst1"].ToString();

                if (objbl.Save(obj))
                {
                    if (obj.ProductPurchaseID == "0" || obj.ProductPurchaseID == "" || obj.ProductPurchaseID == null)
                    {
                        ModelState.Clear();
                        TempData["msg"] = "Purchase Saved Successfully !";
                    }
                    else
                    {
                        ModelState.Clear();
                        TempData["msg"] = "Purchase Updated Successfully !";
                    }
                }
            }
            catch (Exception ex)
            {
                return(RedirectToAction("Purchase", "Purchase"));
            }
            return(RedirectToAction("Purchase", "Purchase"));
        }