示例#1
0
        //public IEnumerable<vmChemicalSetupMasterDetail> GetSizingChemicalConsumptionDetailByID(vmCmnParameters objcmnParam)
        //{
        //    GFactory_vmChemicalSetupMasterDetail_GF = new vmChemicalSetupMasterDetail_GF();
        //    IEnumerable<vmChemicalSetupMasterDetail> objChemicalDetailByID = null;
        //    string spQuery = string.Empty;
        //    try
        //    {
        //        using (_ctxCmn = new ERP_Entities())
        //        {
        //            Hashtable ht = new Hashtable();
        //            ht.Add("CompanyID", objcmnParam.loggedCompany);
        //            ht.Add("LoggedUser", objcmnParam.loggeduser);
        //            ht.Add("PageNo", objcmnParam.pageNumber);
        //            ht.Add("RowCountPerPage", objcmnParam.pageSize);
        //            ht.Add("IsPaging", objcmnParam.IsPaging);
        //            ht.Add("SetID", objcmnParam.ItemType);
        //            ht.Add("ChemicalConsumptionID", objcmnParam.id);

        //            spQuery = "[Get_SizingChemicalConsumptionDetailByID]";
        //            objChemicalDetailByID = GFactory_vmChemicalSetupMasterDetail_GF.ExecuteQuery(spQuery, ht);
        //        }
        //    }
        //    catch (Exception e)
        //    {
        //        e.ToString();
        //    }
        //    return objChemicalDetailByID;
        //}

        public vmBallInfo GetCurrentStock(vmCmnParameters objcmnParam)
        {
            GenericFactory_vmBallInfo_GF = new vmBallInfo_GF();
            vmBallInfo CurrentStockByFilter = null;
            string     spQuery = string.Empty;

            try
            {
                using (_ctxCmn = new ERP_Entities())
                {
                    Hashtable ht = new Hashtable();
                    ht.Add("CompanyID", objcmnParam.loggedCompany);
                    ht.Add("LoggedUser", objcmnParam.loggeduser);
                    ht.Add("ItemID", objcmnParam.id);
                    ht.Add("SupplierID", objcmnParam.ItemType);
                    ht.Add("BatchID", objcmnParam.ItemGroup);
                    ht.Add("DepartmentID", objcmnParam.DepartmentID);
                    ht.Add("UnitID", objcmnParam.UserType);

                    spQuery = "[Get_SizingChemConsumpCurrentStock]";
                    CurrentStockByFilter = GenericFactory_vmBallInfo_GF.ExecuteQuerySingle(spQuery, ht);
                }
            }
            catch (Exception e)
            {
                e.ToString();
            }
            return(CurrentStockByFilter);
        }
        public IHttpActionResult GetCurrentStock(object[] data)
        {
            vmBallInfo      singleCStock = null;
            vmCmnParameters objcmnParam  = JsonConvert.DeserializeObject <vmCmnParameters>(data[0].ToString());

            try
            {
                singleCStock = objChemConsumpService.GetCurrentStock(objcmnParam);
            }
            catch (Exception e)
            {
                e.ToString();
            }
            return(Json(new
            {
                singleCStock
            }));
            //return objListBuyer.ToList();
        }
示例#3
0
        public IHttpActionResult GetItemWiseStock(object[] data)
        {
            vmBallInfo      ItemStockList = null;
            vmBallInfo      ItemInfo      = JsonConvert.DeserializeObject <vmBallInfo>(data[0].ToString());
            vmCmnParameters objcmnParam   = JsonConvert.DeserializeObject <vmCmnParameters>(data[1].ToString());

            try
            {
                ItemStockList = objBallWarpingService.GetItemWiseStock(ItemInfo, objcmnParam);
            }
            catch (Exception e)
            {
                e.ToString();
            }
            return(Json(new
            {
                ItemStockList
            }));
        }