Exemplo n.º 1
0
 public List <GetAllPart_Result> GetAllPart()
 {
     using (InventoryToolDBEntities entity = new InventoryToolDBEntities())
     {
         var RetVal = entity.GetAllPart().ToList().Select(s => new GetAllPart_Result
         {
             Category_Id       = s.Category_Id,
             Part_Type_Id      = s.Part_Type_Id,
             Part_Name         = s.Part_Name,
             Part_Id           = s.Part_Id,
             Part_Code         = s.Part_Code,
             Outsource_Type_Id = s.Outsource_Type_Id,
             Color_Id          = s.Color_Id,
             Material_Id       = s.Material_Id,
             Category_Name     = s.Category_Name,
             Color_Name        = s.Color_Name,
             Material_Name     = s.Material_Name,
             Unit_Id           = s.Unit_Id,
             Outsource_Type    = s.Outsource_Type,
             Part_Type         = s.Part_Type,
             Unit_Name         = s.Unit_Name,
             Criticality_Id    = s.Criticality_Id,
             Criticality_Name  = s.Criticality_Name,
             Min_Quantity      = s.Min_Quantity,
             Image_Id          = s.Image_Id
         }).ToList();
         return(RetVal);
     }
 }
Exemplo n.º 2
0
 public List <vw_MinimumBalance> GetMinBalanceReport()
 {
     using (InventoryToolDBEntities entity = new InventoryToolDBEntities())
     {
         var RetVal = entity.vw_MinimumBalance.ToList().Select(s => new vw_MinimumBalance
         {
             Category_Id       = s.Category_Id,
             Part_Type_Id      = s.Part_Type_Id,
             Part_Name         = s.Part_Name,
             Part_Id           = s.Part_Id,
             Part_Code         = s.Part_Code,
             Outsource_Type_Id = s.Outsource_Type_Id,
             Color_Id          = s.Color_Id,
             Material_Id       = s.Material_Id,
             Category_Name     = s.Category_Name,
             Color_Name        = s.Color_Name,
             Material_Name     = s.Material_Name,
             Unit_Id           = s.Unit_Id,
             Outsource_Type    = s.Outsource_Type,
             Part_Type         = s.Part_Type,
             Unit_Name         = s.Unit_Name,
             Criticality_Id    = s.Criticality_Id,
             Criticality_Name  = s.Criticality_Name,
             Balance_Quantity  = s.Balance_Quantity,
             Min_Quantity      = s.Min_Quantity
         }).ToList();
         return(RetVal);
     }
 }
 public List <GetPartByFilter_Result> GetPartByFilter(int?part_Type_Id, int?outsource_Type_Id, string part_Code, string part_Name, int?unit_Id, int?category_Id, int?color_Id, int?material_Id, int?criticality_Id)
 {
     using (InventoryToolDBEntities entity = new InventoryToolDBEntities())
     {
         var RetVal = entity.GetPartByFilter(part_Type_Id, outsource_Type_Id, part_Code, part_Name, unit_Id, category_Id, color_Id, material_Id, criticality_Id).ToList().Select(s => new GetPartByFilter_Result
         {
             Category_Id       = s.Category_Id,
             Part_Type_Id      = s.Part_Type_Id,
             Part_Name         = s.Part_Name,
             Part_Id           = s.Part_Id,
             Part_Code         = s.Part_Code,
             Outsource_Type_Id = s.Outsource_Type_Id,
             Color_Id          = s.Color_Id,
             Material_Id       = s.Material_Id,
             Category_Name     = s.Category_Name,
             Color_Name        = s.Color_Name,
             Material_Name     = s.Material_Name,
             Unit_Id           = s.Unit_Id,
             Outsource_Type    = s.Outsource_Type,
             Part_Type         = s.Part_Type,
             Unit_Name         = s.Unit_Name,
             Criticality_Id    = s.Criticality_Id,
             Criticality_Name  = s.Criticality_Name,
             Balance_Quantity  = s.Balance_Quantity,
             Image_Id          = s.Image_Id
         }).ToList();
         return(RetVal);
     }
 }
 public int UpdatePartStock(UpdatePartStock UpdatePartStock)
 {
     using (InventoryToolDBEntities entity = new InventoryToolDBEntities())
     {
         entity.Database.ExecuteStoredProcedure(UpdatePartStock);
         return(Convert.ToInt32(UpdatePartStock.return_Status));
     }
 }
Exemplo n.º 5
0
        public IHttpActionResult UpdatePartImage(VMImage PartImage)
        {
            var return_Status = new ObjectParameter("return_Status", typeof(int));

            using (InventoryToolDBEntities entity = new InventoryToolDBEntities())
            {
                entity.UpdatePartImage(PartImage.Parent_Id, PartImage.Image.Image_Data, PartImage.Image.LastModifiedBy, return_Status);
                return(Ok(return_Status.Value));
            }
        }
Exemplo n.º 6
0
        public IHttpActionResult UpdateProduct(M_Product product)
        {
            var return_Status = new ObjectParameter("return_Status", typeof(int));

            using (InventoryToolDBEntities entity = new InventoryToolDBEntities())
            {
                entity.UpdateProduct(product.Product_Id, product.Product_Code, product.Product_Name, product.Manufacturing_Days, product.Description, product.LastModifiedBy, return_Status);
                return(Ok(return_Status.Value));
            }
        }
        public int DeleteCustomer(int Customer_Id, string LastModifiedBy)
        {
            var return_Status = new ObjectParameter("return_Status", typeof(int));

            using (InventoryToolDBEntities entity = new InventoryToolDBEntities())
            {
                entity.DeleteCustomer(Customer_Id, LastModifiedBy, return_Status);
                return(Convert.ToInt32(return_Status.Value));
            }
        }
Exemplo n.º 8
0
        public IHttpActionResult UpdatePart(M_Part Part)
        {
            var return_Status = new ObjectParameter("return_Status", typeof(int));

            using (InventoryToolDBEntities entity = new InventoryToolDBEntities())
            {
                entity.UpdatePart(Part.Part_Id, Part.Part_Type_Id, Part.Outsource_Type_Id, Part.Part_Code, Part.Part_Name, Part.Unit_Id,
                                  Part.Category_Id, Part.Color_Id, Part.Material_Id, Part.Criticality_Id, Part.Min_Quantity, Part.LastModifiedBy, return_Status);
                return(Ok(return_Status.Value));
            }
        }
Exemplo n.º 9
0
 public List <GetAllStore_Result> GetAllStore()
 {
     using (InventoryToolDBEntities entity = new InventoryToolDBEntities())
     {
         var RetVal = entity.GetAllStore().ToList().Select(s => new GetAllStore_Result
         {
             Store_Id   = s.Store_Id,
             Store_Name = s.Store_Name
         }).ToList();
         return(RetVal);
     }
 }
Exemplo n.º 10
0
        public int AddUpdateCustomer(M_Customer Customer)
        {
            var return_Status = new ObjectParameter("return_Status", typeof(int));

            using (InventoryToolDBEntities entity = new InventoryToolDBEntities())
            {
                entity.UpdateCustomer(Customer.Customer_Id, Customer.Customer_Code, Customer.Customer_Name, Customer.Contact_No,
                                      Customer.Email, Customer.Address1, Customer.Address2, Customer.City, Customer.State, Customer.PinCode,
                                      Customer.TinNo, Customer.VatNo, Customer.Note, Customer.LastModifiedBy, return_Status);
                return(Convert.ToInt32(return_Status.Value));
            }
        }
Exemplo n.º 11
0
 public List <GetAllCriticality_Result> GetAllCriticality()
 {
     using (InventoryToolDBEntities entity = new InventoryToolDBEntities())
     {
         var RetVal = entity.GetAllCriticality().ToList().Select(s => new GetAllCriticality_Result
         {
             Criticality_Id   = s.Criticality_Id,
             Criticality_Name = s.Criticality_Name
         }).ToList();
         return(RetVal);
     }
 }
Exemplo n.º 12
0
 public List <GetAllOutsourceType_Result> GetAllOutsourceType()
 {
     using (InventoryToolDBEntities entity = new InventoryToolDBEntities())
     {
         var RetVal = entity.GetAllOutsourceType().ToList().Select(s => new GetAllOutsourceType_Result
         {
             Outsource_Type    = s.Outsource_Type,
             Outsource_Type_Id = s.Outsource_Type_Id
         }).ToList();
         return(RetVal);
     }
 }
Exemplo n.º 13
0
 public List <GetAllMaterial_Result> GetAllMaterial()
 {
     using (InventoryToolDBEntities entity = new InventoryToolDBEntities())
     {
         var RetVal = entity.GetAllMaterial().ToList().Select(s => new GetAllMaterial_Result
         {
             Material_Id   = s.Material_Id,
             Material_Name = s.Material_Name
         }).ToList();
         return(RetVal);
     }
 }
Exemplo n.º 14
0
 public List <GetImage_Result> GetImage(int Image_Id)
 {
     using (InventoryToolDBEntities entity = new InventoryToolDBEntities())
     {
         var RetVal = entity.GetImage(Image_Id).ToList().Select(s => new GetImage_Result
         {
             Image_Data = s.Image_Data,
             Image_Id   = s.Image_Id
         }).ToList();
         return(RetVal);
     }
 }
Exemplo n.º 15
0
 public List <GetAllProduct_Result> GetAllProduct()
 {
     using (InventoryToolDBEntities entity = new InventoryToolDBEntities())
     {
         var RetVal = entity.GetAllProduct().ToList().Select(s => new GetAllProduct_Result
         {
             Description        = s.Description,
             Manufacturing_Days = s.Manufacturing_Days,
             Product_Code       = s.Product_Code,
             Product_Id         = s.Product_Id,
             Product_Name       = s.Product_Name
         }).ToList();
         return(RetVal);
     }
 }
Exemplo n.º 16
0
 public List <GetUserPermission_Result> GetUserPermission(string User_Name)
 {
     using (InventoryToolDBEntities entity = new InventoryToolDBEntities())
     {
         var RetVal = entity.GetUserPermission(User_Name).ToList().Select(s => new GetUserPermission_Result
         {
             Window_Id   = s.Window_Id,
             Role_Id     = s.Role_Id,
             CanView     = s.CanView,
             CanAdd      = s.CanAdd,
             CanUpdate   = s.CanUpdate,
             CanDelete   = s.CanDelete,
             CanPrint    = s.CanPrint,
             CanDownload = s.CanDownload,
             CanUpload   = s.CanUpload
         }).ToList();
         return(RetVal);
     }
 }
Exemplo n.º 17
0
 public List <GetAllCustomer_Result> GetAllCustomer()
 {
     using (InventoryToolDBEntities entity = new InventoryToolDBEntities())
     {
         var RetVal = entity.GetAllCustomer().ToList().Select(s => new GetAllCustomer_Result
         {
             Customer_Code = s.Customer_Code,
             Customer_Id   = s.Customer_Id,
             Customer_Name = s.Customer_Name,
             Address1      = s.Address1,
             Address2      = s.Address2,
             City          = s.City,
             Contact_No    = s.Contact_No,
             Email         = s.Email,
             Note          = s.Note,
             PinCode       = s.PinCode,
             State         = s.State,
             TinNo         = s.TinNo,
             VatNo         = s.VatNo
         }).ToList();
         return(RetVal);
     }
 }
Exemplo n.º 18
0
 public List <GetStockPartDetailReport_Result> GetStockPartDetailReport(int?Part_Id)
 {
     using (InventoryToolDBEntities entity = new InventoryToolDBEntities())
     {
         var RetVal = entity.GetStockPartDetailReport(Part_Id).ToList().Select(s => new GetStockPartDetailReport_Result
         {
             Part_Name              = s.Part_Name,
             Part_Id                = s.Part_Id,
             Action_Guid            = s.Action_Guid,
             Date                   = s.Date,
             Description            = s.Description,
             In_Quantity            = s.In_Quantity,
             Out_Quantity           = s.Out_Quantity,
             Part_Stock_Id          = s.Part_Stock_Id,
             StoreTransferType_Id   = s.StoreTransferType_Id,
             StoreTransferType_Name = s.StoreTransferType_Name,
             Store_Id               = s.Store_Id,
             Store_Name             = s.Store_Name,
             Image_Id               = s.Image_Id
         }).ToList();
         return(RetVal);
     }
 }