public PurchaseController()
        {
            sessid = Convert.ToString(System.Web.HttpContext.Current.Session["usercode"]); // "a";  //Convert.ToString(Session["UserId"]);

            branchcode = Convert.ToString(System.Web.HttpContext.Current.Session["branchcode"]);
            partnername = Convert.ToString(System.Web.HttpContext.Current.Session["partnername"]);
            usertype = Convert.ToString(System.Web.HttpContext.Current.Session["usertype"]);
            rolename = Convert.ToString(System.Web.HttpContext.Current.Session["rolename"]);

            pcls = new PurchaseEntryDal();
            inv = new inventoryforwebappEntities();

            con = new SqlConnection(ConfigurationManager.ConnectionStrings["SqlCon"].ConnectionString);
        }
        public ChallanOutController()
        {
            sessid = Convert.ToString(System.Web.HttpContext.Current.Session["usercode"]); // "a";  //Convert.ToString(Session["UserId"]);
            if (sessid == "")
            {

                return;
            }
            branchcode = Convert.ToString(System.Web.HttpContext.Current.Session["branchcode"]);
            partnername = Convert.ToString(System.Web.HttpContext.Current.Session["partnername"]);
            usertype = Convert.ToString(System.Web.HttpContext.Current.Session["usertype"]);
             //   sessid = "a"; // Convert.ToString(Session["UserId"]);

            con = new SqlConnection(ConfigurationManager.ConnectionStrings["SqlCon"].ConnectionString);
                pcls = new PurchaseEntryDal();
                ccls = new ChallanDAL();
                inv = new inventoryforwebappEntities();
                acicls = new Add_CountryInsert();
        }