public JsonResult UnAssignAssetToEmployee(string employeeID, string itemSerialNo, string allocationSeqNo, string storeLocation, string itemCode, string totalSerialInStock) { try { objLoginHelper = (LoginHelper)Session["LogInInformation"]; string sequenceNumber = Helper.ChallanCequenceNumberGeneration(inventoryDal.EmployeeWiseFixedAssetsAllocationSequenceNumberMax(objLoginHelper.LocationCode, employeeID, itemCode, Convert.ToByte(storeLocation)), objLoginHelper); Fix_EmployeeWiseFixedAssetsAllocationWithSerialNo objEmployeeWiseFixedAssetsAllocationWithSerialNo = new Fix_EmployeeWiseFixedAssetsAllocationWithSerialNo(); objEmployeeWiseFixedAssetsAllocationWithSerialNo.StoreLocation = Convert.ToByte(storeLocation); objEmployeeWiseFixedAssetsAllocationWithSerialNo.LocationCode = objLoginHelper.LocationCode; objEmployeeWiseFixedAssetsAllocationWithSerialNo.ItemCode = itemCode; objEmployeeWiseFixedAssetsAllocationWithSerialNo.EmployeeID = employeeID; objEmployeeWiseFixedAssetsAllocationWithSerialNo.AllocationSeqNo = sequenceNumber; objEmployeeWiseFixedAssetsAllocationWithSerialNo.ItemSerialNo = itemSerialNo; objEmployeeWiseFixedAssetsAllocationWithSerialNo.IsItAllocated = false; objEmployeeWiseFixedAssetsAllocationWithSerialNo.Status = Helper.Active; Fix_EmployeeWiseFixedAssetsAllocation objEmployeeWiseFixedAssetsAllocation = new Fix_EmployeeWiseFixedAssetsAllocation(); objEmployeeWiseFixedAssetsAllocation.StoreLocation = Convert.ToByte(storeLocation.Trim()); objEmployeeWiseFixedAssetsAllocation.LocationCode = objLoginHelper.LocationCode.Trim(); objEmployeeWiseFixedAssetsAllocation.ItemCode = itemCode.Trim(); objEmployeeWiseFixedAssetsAllocation.EmployeeID = employeeID.Trim(); objEmployeeWiseFixedAssetsAllocation.AllocationSeqNo = sequenceNumber; objEmployeeWiseFixedAssetsAllocation.AllocationDate = DateTime.Now; objEmployeeWiseFixedAssetsAllocation.AllocatedQuantity = -1; //objEmployeeWiseFixedAssetsAllocation.AllocatedBy = objLoginHelper.LogInID; objEmployeeWiseFixedAssetsAllocation.CreatedBy = objLoginHelper.LogInID; objEmployeeWiseFixedAssetsAllocation.CreatedOn = DateTime.Now; objEmployeeWiseFixedAssetsAllocation.Status = Helper.Active; inventoryDal.UpdateCashmemoAssign(objEmployeeWiseFixedAssetsAllocationWithSerialNo, objEmployeeWiseFixedAssetsAllocation); return(new JsonResult { Data = ExceptionHelper.ExceptionMessage(string.Empty) }); } catch (Exception ex) { return(new JsonResult { Data = ExceptionHelper.ExceptionMessage(ex) }); } }
public JsonResult SaveAssetAssign(string employeeId, string itemCode, string storeLocation, string allocatedQuantity, string remarks, string serialItems) { objLoginHelper = (LoginHelper)Session["LogInInformation"]; Fix_EmployeeWiseFixedAssetsAllocation objEmployeeWiseFixedAssetsAllocation = new Fix_EmployeeWiseFixedAssetsAllocation(); Fix_EmployeeWiseFixedAssetsAllocationWithSerialNo objEmployeeWiseFixedAssetsAllocationWithSerialNo; List <Fix_EmployeeWiseFixedAssetsAllocationWithSerialNo> lstAssetsAllocationWithSerialNo = new List <Fix_EmployeeWiseFixedAssetsAllocationWithSerialNo>(); try { string sequenceNumber = Helper.ChallanCequenceNumberGeneration(inventoryDal.EmployeeWiseFixedAssetsAllocationSequenceNumberMax(objLoginHelper.LocationCode, employeeId, itemCode, Convert.ToByte(storeLocation)), objLoginHelper); objEmployeeWiseFixedAssetsAllocation.StoreLocation = Convert.ToByte(storeLocation.Trim()); objEmployeeWiseFixedAssetsAllocation.LocationCode = objLoginHelper.LocationCode.Trim(); objEmployeeWiseFixedAssetsAllocation.ItemCode = itemCode.Trim(); objEmployeeWiseFixedAssetsAllocation.EmployeeID = employeeId.Trim(); objEmployeeWiseFixedAssetsAllocation.AllocationSeqNo = sequenceNumber; objEmployeeWiseFixedAssetsAllocation.AllocationDate = DateTime.Now; objEmployeeWiseFixedAssetsAllocation.AllocatedQuantity = Convert.ToInt16(allocatedQuantity); objEmployeeWiseFixedAssetsAllocation.AllocatedBy = objLoginHelper.LogInID; objEmployeeWiseFixedAssetsAllocation.Remarks = remarks; objEmployeeWiseFixedAssetsAllocation.CreatedBy = objLoginHelper.LogInID; objEmployeeWiseFixedAssetsAllocation.CreatedOn = DateTime.Now; objEmployeeWiseFixedAssetsAllocation.Status = Helper.Active; if (!string.IsNullOrEmpty(serialItems)) { string[] serialItemAssign = serialItems.Split('#'); int serialCounter = 0, serialItemLength = serialItemAssign.Length; for (serialCounter = 0; serialCounter < serialItemLength; serialCounter++) { objEmployeeWiseFixedAssetsAllocationWithSerialNo = new Fix_EmployeeWiseFixedAssetsAllocationWithSerialNo(); objEmployeeWiseFixedAssetsAllocationWithSerialNo.StoreLocation = Convert.ToByte(storeLocation.Trim()); objEmployeeWiseFixedAssetsAllocationWithSerialNo.LocationCode = objLoginHelper.LocationCode; objEmployeeWiseFixedAssetsAllocationWithSerialNo.ItemCode = itemCode; objEmployeeWiseFixedAssetsAllocationWithSerialNo.EmployeeID = employeeId; objEmployeeWiseFixedAssetsAllocationWithSerialNo.AllocationSeqNo = sequenceNumber; objEmployeeWiseFixedAssetsAllocationWithSerialNo.ItemSerialNo = serialItemAssign[0]; if (objEmployeeWiseFixedAssetsAllocation.AllocatedQuantity > 0) { objEmployeeWiseFixedAssetsAllocationWithSerialNo.IsItAllocated = true; } else { objEmployeeWiseFixedAssetsAllocationWithSerialNo.IsItAllocated = false; } objEmployeeWiseFixedAssetsAllocationWithSerialNo.Status = Helper.Active; lstAssetsAllocationWithSerialNo.Add(objEmployeeWiseFixedAssetsAllocationWithSerialNo); } } inventoryDal.SaveFisedAssetFroEmployee(objEmployeeWiseFixedAssetsAllocation, lstAssetsAllocationWithSerialNo); return(new JsonResult { Data = ExceptionHelper.ExceptionMessage(string.Empty) }); } catch (Exception ex) { return(new JsonResult { Data = ExceptionHelper.ExceptionMessage(ex) }); } }
public Fix_EmployeeWiseFixedAssetsAllocation UpdateCashmemoAssign(Fix_EmployeeWiseFixedAssetsAllocationWithSerialNo objEmployeeWiseFixedAssetsAllocationWithSerialNo, Fix_EmployeeWiseFixedAssetsAllocation objAssetAssign) { return(erpService.UpdateCashmemoAssign(objEmployeeWiseFixedAssetsAllocationWithSerialNo, objAssetAssign)); }
public Fix_EmployeeWiseFixedAssetsAllocation SaveForCashMemoAllocation(Fix_EmployeeWiseFixedAssetsAllocation objAssetAssign, List <Fix_EmployeeWiseFixedAssetsAllocationWithSerialNo> lstAssetsAllocationWithSerialNo) { return(erpService.CreateForCashMemo(objAssetAssign, lstAssetsAllocationWithSerialNo)); }