public static ControlIssuesAccountModel FindSecurityCode(int securityCode) { var @SecurityCode = new SqlParameter("@SecurityCode", securityCode); StoringSystemEntities db = new StoringSystemEntities(); return(db.ExecuteStoreQuery <ControlIssuesAccountModel>("EXEC spm_CheckControlIssuesAccount @SecurityCode", @SecurityCode).FirstOrDefault()); }
public static bool Insert(OutputingModel model) { var @ProductNo = new SqlParameter("@ProductNo", model.ProductNo); var @Barcode = new SqlParameter("@Barcode", model.Barcode); var @SizeNo = new SqlParameter("@SizeNo", model.SizeNo); var @CartonNo = new SqlParameter("@CartonNo", model.CartonNo); var @GrossWeight = new SqlParameter("@GrossWeight", model.GrossWeight); var @ActualWeight = new SqlParameter("@ActualWeight", model.ActualWeight); var @DifferencePercent = new SqlParameter("@DifferencePercent", model.DifferencePercent); var @IsPass = new SqlParameter("@IsPass", model.IsPass); var @WorkerId = new SqlParameter("@WorkerId", model.WorkerId); var @IssuesId = new SqlParameter("@IssuesId", model.IssuesId); StoringSystemEntities db = new StoringSystemEntities(); if (db.ExecuteStoreCommand("EXEC spm_InsertOutputing @ProductNo, @Barcode, @SizeNo, @CartonNo, @GrossWeight, @ActualWeight, @DifferencePercent, @IsPass, @WorkerId, @IssuesId", @ProductNo, @Barcode, @SizeNo, @CartonNo, @GrossWeight, @ActualWeight, @DifferencePercent, @IsPass, @WorkerId, @IssuesId) >= 1) { return(true); } else { return(false); } }
public static List <OutputingModel> SelectPerPO(string productNo) { var @ProductNo = new SqlParameter("@ProductNo", productNo); StoringSystemEntities db = new StoringSystemEntities(); return(db.ExecuteStoreQuery <OutputingModel>("EXEC spm_SelectOutputingPerPO @ProductNo", @ProductNo).ToList()); }
public static StoringModel SelectByBarcode(string barcode) { var @Barcode = new SqlParameter("@Barcode", barcode); StoringSystemEntities db = new StoringSystemEntities(); return(db.ExecuteStoreQuery <StoringModel>("EXEC spm_SelectStoringPerBarcode @Barcode", @Barcode).FirstOrDefault()); }
public static AccountModel Select(string userName, string password) { var @UserName = new SqlParameter("@UserName", userName); var @Password = new SqlParameter("@Password", password); StoringSystemEntities db = new StoringSystemEntities(); return(db.ExecuteStoreQuery <AccountModel>("EXEC spm_CheckAccount @UserName,@Password", @UserName, @Password).FirstOrDefault()); }
public static bool Exist() { StoringSystemEntities db = new StoringSystemEntities(); if (db.DatabaseExists() == true) { return(true); } return(false); }
public static List <StoringModel> SelectByDate(DateTime today, string workerId) { var @Day = new SqlParameter("@Day", today.Day); var @Month = new SqlParameter("@Month", today.Month); var @Year = new SqlParameter("@Year", today.Year); var @WorkerId = new SqlParameter("@WorkerId", workerId); StoringSystemEntities db = new StoringSystemEntities(); return(db.ExecuteStoreQuery <StoringModel>("EXEC spm_SelectStoringByDate @Day, @Month, @Year, @WorkerID", @Day, @Month, @Year, @WorkerId).ToList()); }
public static bool Insert(IssuesDetailModel model) { var @ProductNo = new SqlParameter("@ProductNo", model.ProductNo); var @Barcode = new SqlParameter("@Barcode", model.Barcode); var @CartonNo = new SqlParameter("@CartonNo", model.CartonNo); var @SizeNo = new SqlParameter("@SizeNo", model.SizeNo); var @IssuesId = new SqlParameter("@IssuesId", model.IssuesId); var @GrossWeight = new SqlParameter("@GrossWeight", model.GrossWeight); var @ActualWeight = new SqlParameter("@ActualWeight", model.ActualWeight); var @DifferencePercent = new SqlParameter("@DifferencePercent", model.DifferencePercent); var @Process = new SqlParameter("@Process", model.Process); var @CheckBy = new SqlParameter("@CheckBy", model.CheckBy); var @Location = new SqlParameter("@Location", model.Location); StoringSystemEntities db = new StoringSystemEntities(); if (db.ExecuteStoreCommand("EXEC spm_InsertIssuesDetail @ProductNo, @Barcode, @CartonNo, @SizeNo, @IssuesId, @GrossWeight, @ActualWeight, @DifferencePercent, @Process, @CheckBy,@Location", @ProductNo, @Barcode, @CartonNo, @SizeNo, @IssuesId, @GrossWeight, @ActualWeight, @DifferencePercent, @Process, @CheckBy, @Location) >= 1) { return(true); } else { return(false); } }
public static List <IssuesModel> Select() { StoringSystemEntities db = new StoringSystemEntities(); return(db.ExecuteStoreQuery <IssuesModel>("EXEC spm_SelectIssues").ToList()); }
public static List <AccountModel> Get() { StoringSystemEntities db = new StoringSystemEntities(); return(db.ExecuteStoreQuery <AccountModel>("EXEC spm_GetAccount").ToList()); }
public static List <OutputingModel> SelectIsNotLoad() { StoringSystemEntities db = new StoringSystemEntities(); return(db.ExecuteStoreQuery <OutputingModel>("EXEC spm_SelectOutputingIsNotLoad").ToList()); }