public string SelectLTProdCodeList(int PgID, int ObjID, string Prefix, int Sort, int Active, int ByID)
        {
            Commands cmd     = new Commands();
            string   s       = string.Empty;
            int      iResult = 0;

            try
            {
                ProductionFnc pf = new ProductionFnc();
                DataTable     dt = pf.SelectLTProdCodeList(Prefix, Sort, Active, ByID);
                s       = GenUtilities.JSON(dt);
                iResult = cmd.LogAjaxCall(PgID, ObjID, 1, "SelectLTProdCodeList", s.Length, ByID);
                return(s);
            }
            catch (Exception ex)
            {
                iResult = cmd.LogApplicationError("LT Code List", 0, ByID, ex.Message, 0, "SelectLTProdCodeList function", ByID);
                JavaScriptSerializer js = new JavaScriptSerializer();
                var response            = new { success = "false", message = ex.Message };
                return(response.ToJSON());
            }
        }
        public string SelectInventoryItemData(int PgID, int ObjID, string ProdType, string ProdCode, string Loc, string A1, string A2, string A3, string A4, string A5, string A6, string A7, string A8, string A9, string A10, string A11, string A12, string A13, int ByID)
        {
            Commands cmd     = new Commands();
            string   s       = string.Empty;
            int      iResult = 0;

            try
            {
                ProductionFnc pf = new ProductionFnc();
                DataTable     dt = pf.SelectInventoryItemData(ProdType, ProdCode, Loc, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, ByID);
                s       = GenUtilities.JSON(dt);
                iResult = cmd.LogAjaxCall(PgID, ObjID, 1, "SelectInventoryItemData", s.Length, ByID);
                return(s);
            }
            catch (Exception ex)
            {
                iResult = cmd.LogApplicationError("Inv Item Data", 0, ByID, ex.Message, 0, "SelectInventoryItemData function", ByID);
                JavaScriptSerializer js = new JavaScriptSerializer();
                var response            = new { success = "false", message = ex.Message };
                return(response.ToJSON());
            }
        }
        public string SelectDateRangeForMillCmtList(int PgID, int ObjID, string TargetDt, int NbrInList, int ByID)
        {
            Commands cmd     = new Commands();
            string   s       = string.Empty;
            int      iResult = 0;

            try
            {
                ProductionFnc pf = new ProductionFnc();
                DataTable     dt = pf.SelectDateRangeForMillCmtList(TargetDt, NbrInList, ByID);
                s       = GenUtilities.JSON(dt);
                iResult = cmd.LogAjaxCall(PgID, ObjID, 1, "SelectDateRangeForMillCmt", s.Length, ByID);
                return(s);
            }
            catch (Exception ex)
            {
                iResult = cmd.LogApplicationError("Mill Cmt Date Range", 0, ByID, ex.Message, 0, "SelectDateRangeForMillCmt function", ByID);
                JavaScriptSerializer js = new JavaScriptSerializer();
                var response            = new { success = "false", message = ex.Message };
                return(response.ToJSON());
            }
        }
        public string SelectInventoryDataDetailed(int PgID, int ObjID, string Reg, string LocCode, string LocType, string PCode, string PType, string Thick, string Specie, string Grade, string Season, string Surf,
                                                  string Wdth, string Len, string Color, string fSort, string Milling, string NoPrint, string FuzzyGrade, string FuzzySort, string FuzzyProd, string Lvl, int Sort, int Active, int PgNbr, int PgSize, int ByID)
        {
            Commands cmd     = new Commands();
            string   s       = string.Empty;
            int      iResult = 0;

            try
            {
                ProductionFnc pf = new ProductionFnc();
                DataTable     dt = pf.SelectInventoryDataDetailed(Reg, LocCode, LocType, PCode, PType, Thick, Specie, Grade, Season, Surf, Wdth, Len, Color, fSort, Milling, NoPrint, FuzzyGrade, FuzzySort, FuzzyProd,
                                                                  Lvl, Sort, Active, PgNbr, PgSize, ByID);
                s       = GenUtilities.JSON(dt);
                iResult = cmd.LogAjaxCall(PgID, ObjID, 1, "SelectInventoryDataDetailed", s.Length, ByID);
                return(s);
            }
            catch (Exception ex)
            {
                iResult = cmd.LogApplicationError("Inv Data Detailed", 0, ByID, ex.Message, 0, "SelectInventoryDataDetailed function", ByID);
                JavaScriptSerializer js = new JavaScriptSerializer();
                var response            = new { success = "false", message = ex.Message };
                return(response.ToJSON());
            }
        }