Ejemplo n.º 1
0
        public string UpdateInvRequestLine(int PgID, int ObjID, int IRLineID, int InvReqID, int ItemNbr, int iDocType, string ProdType, string ProdCode, string Desc, 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, double OrigQty, double OrigQty2, double RevQty, double RevQty2, double OrigPrice, double RevPrice, double TotalCRDBAmt, int InvAdj, int RedTag, double RtnQty, double RtnPkg,
                                           double RtnQtyCheckedIn, string Tickets, string Explanation, string LocCode, int IsRtn, int Active, int ByID)
        {
            Commands cmd     = new Commands();
            string   s       = string.Empty;
            int      iResult = 0;

            try
            {
                InvoiceLib inv = new InvoiceLib();
                DataTable  dt  = inv.UpdateInvRequestLine(IRLineID, InvReqID, ItemNbr, iDocType, ProdType, ProdCode, Desc, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, OrigQty, OrigQty, RevQty, RevQty2, OrigPrice, RevPrice, TotalCRDBAmt,
                                                          InvAdj, RedTag, RtnQty, RtnPkg, RtnQtyCheckedIn, Tickets, Explanation, LocCode, IsRtn, Active, ByID);
                s       = GenUtilities.JSON(dt);
                iResult = cmd.LogAjaxCall(PgID, ObjID, 1, "UpdateInvRequestLine", s.Length, ByID);
                return(s);
            }
            catch (Exception ex)
            {
                iResult = cmd.LogApplicationError("Upd InvRequest Line", IRLineID, ByID, ex.Message, 0, "UpdateInvRequestLine function", ByID);
                JavaScriptSerializer js = new JavaScriptSerializer();
                var response            = new { success = "false", message = ex.Message };
                return(response.ToJSON());
            }
        }
Ejemplo n.º 2
0
        public string UpdateInvRequestData(int PgID, int ObjID, int RequestID, int InvReqID, string DtReq, int ReqByID, string DocType, int DispID, string StatusCode, string CustCode, string CustCtlNbr, int CarrierID,
                                           string VendorCode, int InvNbr, string InvDt, int OrdNbr, int ShipNbr, int OtherNbr1, int OtherNbr2, int OtherNbr3, int CreditRepID, int SalesPID, string SalesLead, string ShipFmLoc, string LocCode2,
                                           string LocCode3, string ReasonCode, string ReasonDetail, int CustReqCopy, int Setting1, int Setting2, int Setting3, int Setting4, int Setting5, int Setting6, double OrigAmt, double AdjInvoiceAmt,
                                           double AdjAmt, double FrtRate, double OtherAmt, string OtherVal1, string OtherVal2, string ProdVal1, string ProdVal2, string ProdVal3, string RequiredDt, string TgtDT, string ActDate1, string ActDate2,
                                           string TransDT1, string TransDT2, int NbrProd, int Active, int ByID)
        {
            Commands cmd     = new Commands();
            string   s       = string.Empty;
            int      iResult = 0;

            try
            {
                InvoiceLib inv = new InvoiceLib();
                DataTable  dt  = inv.UpdateInvRequestData(RequestID, InvReqID, DtReq, ReqByID, DocType, DispID, StatusCode, CustCode, CustCtlNbr, CarrierID, VendorCode, InvNbr, InvDt, OrdNbr, ShipNbr, OtherNbr1, OtherNbr2, OtherNbr3,
                                                          CreditRepID, SalesPID, SalesLead, ShipFmLoc, LocCode2, LocCode3, ReasonCode, ReasonDetail, CustReqCopy, Setting1, Setting2, Setting3, Setting4, Setting5, Setting6, OrigAmt, AdjInvoiceAmt, AdjAmt, FrtRate,
                                                          OtherAmt, OtherVal1, OtherVal2, ProdVal1, ProdVal2, ProdVal3, RequiredDt, TgtDT, ActDate1, ActDate2, TransDT1, TransDT2, NbrProd, Active, ByID);
                s       = GenUtilities.JSON(dt);
                iResult = cmd.LogAjaxCall(PgID, ObjID, 1, "UpdateInvRequestData", s.Length, ByID);
                return(s);
            }
            catch (Exception ex)
            {
                iResult = cmd.LogApplicationError("Upd InvRequest", InvReqID, ByID, ex.Message, 0, "UpdateInvRequestData function", ByID);
                JavaScriptSerializer js = new JavaScriptSerializer();
                var response            = new { success = "false", message = ex.Message };
                return(response.ToJSON());
            }
        }
        public string UpdateSalesProductData(int PgID, int ObjID, int ID, string Region, string Prod, string Desc, double Price, string Comments, string Specie, string Thickness,
                                             string Grade, string Len, string Color, string Sort, string Milling, string NoPrint, string ProdType, string ExpPrgID, int NbrAttach, int Mngd, int Track, int ByID)
        {
            Commands cmd     = new Commands();
            string   s       = string.Empty;
            int      iResult = 0;

            try
            {
                int iType = 1;
                if (ID == 0)
                {
                    iType = 0;
                }
                CatToolFunctions ctf = new CatToolFunctions();
                DataTable        dt  = ctf.UpdateSalesProductTrackItem(ID, iType, Region, Prod, Desc, Price, Specie, Thickness, Grade, Len, Color, Sort, Milling, NoPrint, ProdType, ExpPrgID, Track, Mngd, Comments, ByID);
                s       = GenUtilities.JSON(dt);
                iResult = cmd.LogAjaxCall(PgID, ObjID, 1, "UpdateProductDataItem", s.Length, ByID);
                return(s);
            }
            catch (Exception ex)
            {
                iResult = cmd.LogApplicationError("Update ProdData Item", ID, ByID, ex.Message, 0, "UpdateProductDataItem function", ByID);
                JavaScriptSerializer js = new JavaScriptSerializer();
                var response            = new { success = "false", message = ex.Message };
                return(response.ToJSON());
            }
        }
        public string SelectSalesOrderDataDetailed(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 sBDt, string sEDt, int OrdNbr, string CustCode, string Lvl,
                                                   int Sort, int Active, int ROnly, int APShipStat, int DateType, int PgNbr, int PgSize, int ByID)
        {
            Commands cmd     = new Commands();
            string   s       = string.Empty;
            int      iResult = 0;

            try
            {
                SalesFunctions sf = new SalesFunctions();
                DataTable      dt = sf.SelectSalesOrderDataDetailed(Reg, LocCode, LocType, PCode, PType, Thick, Specie, Grade, Season, Surf, Wdth, Len, Color, fSort, Milling, NoPrint, FuzzyGrade, FuzzySort, FuzzyProd,
                                                                    sBDt, sEDt, OrdNbr, CustCode, Lvl, Sort, Active, ROnly, APShipStat, DateType, PgNbr, PgSize, ByID);
                s       = GenUtilities.JSON(dt);
                iResult = cmd.LogAjaxCall(PgID, ObjID, 1, "SelectSalesOrderDataDetailed", s.Length, ByID);
                return(s);
            }
            catch (Exception ex)
            {
                iResult = cmd.LogApplicationError("Sales Ord Data Detailed", 0, ByID, ex.Message, 0, "SelectSalesOrderDataDetailed function", ByID);
                JavaScriptSerializer js = new JavaScriptSerializer();
                var response            = new { success = "false", message = ex.Message };
                return(response.ToJSON());
            }
        }
Ejemplo n.º 5
0
        protected void AddTotalsRow(double[] ttlsarray, PdfPTable pdfobj, string lbl, int nrpreccol, int nbridentcols, int NbrQtyCols, int[] colvis, int prec)
        {
            float     fig = 0;
            PdfPCell  cell;
            BaseColor bc = BaseColor.LIGHT_GRAY;

            switch (nrpreccol)
            {
            case 0:
                bc = new BaseColor(Color.Yellow);
                break;

            case 3:
                bc = new BaseColor(Color.LightSteelBlue);
                break;

            default:
                break;
            }
            int cspan = nbridentcols - nrpreccol + 1;

            iTextSharp.text.Font font5 = iTextSharp.text.FontFactory.GetFont(FontFactory.HELVETICA, 5);
            // add preceding cells

            if (nrpreccol > 0)
            {
                cell = new PdfPCell(new Phrase("", font5));
                cell.BackgroundColor = bc;
                if (nrpreccol > 1)
                {
                    cell.Colspan = (nrpreccol - 1);
                }
                pdfobj.AddCell(cell);
            }
            else
            {
                cspan--;
            }
            // add label cell
            cell                 = new PdfPCell(new Phrase(lbl, font5));
            cell.Colspan         = cspan;
            cell.BackgroundColor = bc;
            pdfobj.AddCell(cell);
            // add column totals
            for (int p2 = 0; p2 < NbrQtyCols; p2++)
            {
                cell = new PdfPCell(new Phrase(GenUtilities.FormatNbrSpecial(ttlsarray[p2], "", 1, ",", ".", prec), font5));
                cell.BackgroundColor = bc;
                pdfobj.AddCell(cell);
            }
        }
Ejemplo n.º 6
0
        private void GetOperands(out string value1, out string value2)
        {
            value1 = GenObject.GetValue(Var1);
            var comparison = GenComparison;

            value2 = UseLit
                         ? Lit
                         : (comparison == GenComparison.Exists || comparison == GenComparison.NotExists
                                ? ""
                                : GenObject.GetValue(Var2));

            if (comparison != GenComparison.Exists && comparison != GenComparison.NotExists &&
                value1.Length != value2.Length &&
                value1 != "" && value2 != "" &&
                GenUtilities.IsNumeric(value1) && GenUtilities.IsNumeric(value2))
            {
                GenUtilities.PadShortNumericOperand(ref value1, ref value2);
            }
        }
        public string SelectProdTypeCodeList(int PgID, int ObjID, string ProdType, int Desc, int Attrib, int ByID)
        {
            Commands cmd     = new Commands();
            string   s       = string.Empty;
            int      iResult = 0;

            try
            {
                DataTable dt = cmd.GetProdTypeCodeList(ProdType, Desc, Attrib, ByID);
                s       = GenUtilities.JSON(dt);
                iResult = cmd.LogAjaxCall(PgID, ObjID, 1, "SelectProdTypeCodeList", s.Length, ByID);
                return(s);
            }
            catch (Exception ex)
            {
                iResult = cmd.LogApplicationError("PType Code List", 0, ByID, ex.Message, 0, "SelectProdTypeCodeList function", ByID);
                JavaScriptSerializer js = new JavaScriptSerializer();
                var response            = new { success = "false", message = ex.Message };
                return(response.ToJSON());
            }
        }
Ejemplo n.º 8
0
        public string SelectLocationList(int PgID, int ObjID, string Loc, string LocType, string Country, string City, int Sort, int Class, int Active, int ByID)
        {
            Commands cmd     = new Commands();
            string   s       = string.Empty;
            int      iResult = 0;

            try
            {
                DataTable dt = cmd.GetLocationList(Loc, LocType, Country, City, Sort, Class, Active, ByID);
                s       = GenUtilities.JSON(dt);
                iResult = cmd.LogAjaxCall(PgID, ObjID, 1, "SelectLocationList", s.Length, ByID);
                return(s);
            }
            catch (Exception ex)
            {
                iResult = cmd.LogApplicationError("Loc List", 0, ByID, ex.Message, 0, "SelectLocationList function", ByID);
                JavaScriptSerializer js = new JavaScriptSerializer();
                var response            = new { success = "false", message = ex.Message };
                return(response.ToJSON());
            }
        }
        public string SelectCurrentMngtWeekData(int PgID, int ObjID, int ByID)
        {
            Commands cmd     = new Commands();
            string   s       = string.Empty;
            int      iResult = 0;

            try
            {
                DataTable dt = cmd.SelectCurrentMngtWeekData(PgID, ByID);
                s       = GenUtilities.JSON(dt);
                iResult = cmd.LogAjaxCall(PgID, ObjID, 1, "SelectCurrentMngtWeekData", s.Length, ByID);
                return(s);
            }
            catch (Exception ex)
            {
                iResult = cmd.LogApplicationError("Curr Mngt Week Data", PgID, ByID, ex.Message, 0, "SelectCurrentMngtWeekData function", ByID);
                JavaScriptSerializer js = new JavaScriptSerializer();
                var response            = new { success = "false", message = ex.Message };
                return(response.ToJSON());
            }
        }
        public string SelectCommentList(int PgID, int ObjID, int ID, int CmtType, string Title, int UserID, string sDtB, string sDtE, string Loc, int Sort, int Active, int PgNbr, int PgSize, int ByID)
        {
            Commands cmd     = new Commands();
            string   s       = string.Empty;
            int      iResult = 0;

            try
            {
                DataTable dt = cmd.SelectCommentList(ID, CmtType, Title, UserID, sDtB, sDtE, Loc, Sort, Active, PgNbr, PgSize, ByID);
                s       = GenUtilities.JSON(dt);
                iResult = cmd.LogAjaxCall(PgID, ObjID, 1, "SelectCommentList", s.Length, ByID);
                return(s);
            }
            catch (Exception ex)
            {
                iResult = cmd.LogApplicationError("Comment List", ID, ByID, ex.Message, 0, "SelectCommentList function", ByID);
                JavaScriptSerializer js = new JavaScriptSerializer();
                var response            = new { success = "false", message = ex.Message };
                return(response.ToJSON());
            }
        }
        public string DeleteDocAttachment(int PgID, int ObjID, int DocID, int AttachID, string Src, int ByID)
        {
            Commands cmd     = new Commands();
            string   s       = string.Empty;
            int      iResult = 0;

            try
            {
                DataTable dt = cmd.DeleteDocAttachment(DocID, AttachID, Src, ByID);
                s       = GenUtilities.JSON(dt);
                iResult = cmd.LogAjaxCall(PgID, ObjID, 1, "DeleteDocAttachment", s.Length, ByID);
                return(s);
            }
            catch (Exception ex)
            {
                iResult = cmd.LogApplicationError("Del Attachment", 0, ByID, ex.Message, 0, "DeleteDoctAttachment function", ByID);
                JavaScriptSerializer js = new JavaScriptSerializer();
                var response            = new { success = "false", message = ex.Message };
                return(response.ToJSON());
            }
        }
        public string UpdateComment(int PgID, int ObjID, int ID, int iType, string CmtType, string Title, string Loc, string Comment, int InsGraph, int Wdth, int Ht, string TDt, int OrigID, int Active, int ByID)
        {
            Commands cmd     = new Commands();
            string   s       = string.Empty;
            int      iResult = 0;

            try
            {
                DataTable dt = cmd.UpdateCommentData(ID, iType, CmtType, Title, Loc, Comment, InsGraph, Wdth, Ht, TDt, OrigID, Active, ByID);
                s       = GenUtilities.JSON(dt);
                iResult = cmd.LogAjaxCall(PgID, ObjID, 1, "UpdateComment", s.Length, ByID);
                return(s);
            }
            catch (Exception ex)
            {
                iResult = cmd.LogApplicationError("UpdateComment", ID, ByID, ex.Message, 0, "UpdateComment function", ByID);
                JavaScriptSerializer js = new JavaScriptSerializer();
                var response            = new { success = "false", message = ex.Message };
                return(response.ToJSON());
            }
        }
        public string UpdateScheduleDate(int PgID, int ObjID, int Yr, int Mo, string Dy, int Typ, int Checked, int Action, int ByID)
        {
            Commands cmd     = new Commands();
            string   s       = string.Empty;
            int      iResult = 0;

            try
            {
                DataTable dt = cmd.UpdateScheduleDate(Yr, Mo, Dy, Typ, Checked, Action, ByID);
                s       = GenUtilities.JSON(dt);
                iResult = cmd.LogAjaxCall(PgID, ObjID, 1, "UpdateScheduleDate", s.Length, ByID);
                return(s);
            }
            catch (Exception ex)
            {
                iResult = cmd.LogApplicationError("UpdateSched", Yr, ByID, ex.Message, 0, "UpdateScheduleDate function", ByID);
                JavaScriptSerializer js = new JavaScriptSerializer();
                var response            = new { success = "false", message = ex.Message };
                return(response.ToJSON());
            }
        }
Ejemplo n.º 14
0
        public string SelectPersListForPosition(int PgID, int ObjID, string Pos, int Sort, int Active, int ByID)
        {
            Commands cmd     = new Commands();
            string   s       = string.Empty;
            int      iResult = 0;

            try
            {
                DataTable dt = cmd.SelectUserListForPosition(Pos, Sort, Active, ByID);                  //"SALES"
                s       = GenUtilities.JSON(dt);
                iResult = cmd.LogAjaxCall(PgID, ObjID, 1, "SelectLocationList", s.Length, ByID);
                return(s);
            }
            catch (Exception ex)
            {
                iResult = cmd.LogApplicationError("Loc List", 0, ByID, ex.Message, 0, "SelectLocationList function", ByID);
                JavaScriptSerializer js = new JavaScriptSerializer();
                var response            = new { success = "false", message = ex.Message };
                return(response.ToJSON());
            }
        }
        public string ChangeLocationContact(int PgID, int ObjID, int ID, int UserID, int iType, int ByID)
        {
            Commands cmd     = new Commands();
            string   s       = string.Empty;
            int      iResult = 0;

            try
            {
                DataTable dt = cmd.UpdateLocationContact(ID, UserID, iType, ByID);
                s       = GenUtilities.JSON(dt);
                iResult = cmd.LogAjaxCall(PgID, ObjID, 1, "ChangeLocationContact", s.Length, ByID);
                return(s);
            }
            catch (Exception ex)
            {
                iResult = cmd.LogApplicationError("Chg Loc Contact", ID, ByID, ex.Message, 0, "ChangeLocationContact function", ByID);
                JavaScriptSerializer js = new JavaScriptSerializer();
                var response            = new { success = "false", message = ex.Message };
                return(response.ToJSON());
            }
        }
Ejemplo n.º 16
0
        public string SelectInvoiceItems(int PgID, int ObjID, int ReqID, int InvoiceID, string SubDocType, int ByID)
        {
            Commands cmd     = new Commands();
            string   s       = string.Empty;
            int      iResult = 0;

            try
            {
                InvoiceLib i  = new InvoiceLib();
                DataTable  dt = i.SelectInvoiceItems(ReqID, InvoiceID, SubDocType, ByID);
                s       = GenUtilities.JSON(dt);
                iResult = cmd.LogAjaxCall(PgID, ObjID, 1, "SelectInvoiceItems", s.Length, ByID);
                return(s);
            }
            catch (Exception ex)
            {
                iResult = cmd.LogApplicationError("Invoice Items", InvoiceID, ByID, ex.Message, 0, "SelectInvoiceItems function", ByID);
                JavaScriptSerializer js = new JavaScriptSerializer();
                var response            = new { success = "false", message = ex.Message };
                return(response.ToJSON());
            }
        }
        public string UpdateProductDataItem(int PgID, int ObjID, int ID, int Typ, string Val, int ByID)
        {
            Commands cmd     = new Commands();
            string   s       = string.Empty;
            int      iResult = 0;

            try
            {
                CatToolFunctions ctf = new CatToolFunctions();
                DataTable        dt  = ctf.UpdateCatToolProductDataItem(ID, Typ, Val, ByID);
                s       = GenUtilities.JSON(dt);
                iResult = cmd.LogAjaxCall(PgID, ObjID, 1, "UpdateProductDataItem", s.Length, ByID);
                return(s);
            }
            catch (Exception ex)
            {
                iResult = cmd.LogApplicationError("Update ProdData Item", ID, ByID, ex.Message, 0, "UpdateProductDataItem function", ByID);
                JavaScriptSerializer js = new JavaScriptSerializer();
                var response            = new { success = "false", message = ex.Message };
                return(response.ToJSON());
            }
        }
        public string SelectUserRequestData(int PgID, int ObjID, int ReqID, int UserID, int ReqTypeID, int ListType, int Sort, int Hist, string BDate, string EDate, int PgNbr, int PgSize, int ByID)
        {
            Commands cmd     = new Commands();
            string   s       = string.Empty;
            int      iResult = 0;

            try
            {
                RequestMngt rm = new RequestMngt();
                DataTable   dt = rm.SelectUserRequestData(ReqID, UserID, ReqTypeID, ListType, Sort, Hist, BDate, EDate, PgNbr, PgSize, ByID);
                s       = GenUtilities.JSON(dt);
                iResult = cmd.LogAjaxCall(PgID, ObjID, 1, "SelectUserRequestData", s.Length, ByID);
                return(s);
            }
            catch (Exception ex)
            {
                iResult = cmd.LogApplicationError("Req Dec Due List", 0, ByID, ex.Message, 0, "SelectUserRequestData function", ByID);
                JavaScriptSerializer js = new JavaScriptSerializer();
                var response            = new { success = "false", message = ex.Message };
                return(response.ToJSON());
            }
        }
        public string SelectDocumentStatusChangeList(int PgID, int ObjID, int ReqID, int InvReqID, int Sort, int ByID)
        {
            Commands cmd     = new Commands();
            string   s       = string.Empty;
            int      iResult = 0;

            try
            {
                DocsForms df = new DocsForms();
                DataTable dt = df.SelectDocumentStatusChangeList(ReqID, InvReqID, Sort, ByID);
                s       = GenUtilities.JSON(dt);
                iResult = cmd.LogAjaxCall(PgID, ObjID, 1, "SelectDocumentStatusChangeList", s.Length, ByID);
                return(s);
            }
            catch (Exception ex)
            {
                iResult = cmd.LogApplicationError("Mill Cmt Date Range", 0, ByID, ex.Message, 0, "SelectDocumentStatusChangeList function", ByID);
                JavaScriptSerializer js = new JavaScriptSerializer();
                var response            = new { success = "false", message = ex.Message };
                return(response.ToJSON());
            }
        }
 protected void LoadUserList()
 {
     this.lblStatusMsg.Text = "";
     try
     {
         Commands  cmd = new Commands();
         DataTable dt  = cmd.SelectUserList(0, "", "", "", "", "", "", 0, 2, 0, _UserID);
         GenUtilities.ClearDDLValues(this.ddlUserList, 1);
         this.ddlUserList.DataValueField = "UserID";
         this.ddlUserList.DataTextField  = "UserFullName3";
         this.ddlUserList.DataSource     = dt;
         this.ddlUserList.DataBind();
         if (dt.Rows.Count == 0)
         {
             this.lblStatusMsg.Text = "No Users were found";
         }
     }
     catch (Exception ex)
     {
         this.lblStatusMsg.Text = "Error encountered when loading user list: " + ex.Message;
     }
 }
        public string SelectProductItemData(int PgID, int ObjID, int PMID, int PLID, string ProdType, string ProdCode, int ByID)
        {
            Commands cmd     = new Commands();
            string   s       = string.Empty;
            int      iResult = 0;

            try
            {
                SalesFunctions sf = new SalesFunctions();
                DataTable      dt = sf.SelectProductItemData(PMID, PLID, ProdType, ProdCode, ByID);
                s       = GenUtilities.JSON(dt);
                iResult = cmd.LogAjaxCall(PgID, ObjID, 1, "SelectProductItemData", s.Length, ByID);
                return(s);
            }
            catch (Exception ex)
            {
                iResult = cmd.LogApplicationError("Prod Item Data", PMID, ByID, ex.Message, 0, "SelectProductItemData function", ByID);
                JavaScriptSerializer js = new JavaScriptSerializer();
                var response            = new { success = "false", message = ex.Message };
                return(response.ToJSON());
            }
        }
        public string DeleteRequestAttachment(int PgID, int ObjID, int ByID)
        {
            Commands cmd     = new Commands();
            string   s       = string.Empty;
            int      iResult = 0;

            try
            {
                GenManage gm = new GenManage();
                DataTable dt = gm.CreateWeeklyReport(ByID);
                s       = GenUtilities.JSON(dt);
                iResult = cmd.LogAjaxCall(PgID, ObjID, 1, "CreateWeeklyReport", s.Length, ByID);
                return(s);
            }
            catch (Exception ex)
            {
                iResult = cmd.LogApplicationError("Create Wk Rpt", 0, ByID, ex.Message, 0, "CreateWeeklyReport function", ByID);
                JavaScriptSerializer js = new JavaScriptSerializer();
                var response            = new { success = "false", message = ex.Message };
                return(response.ToJSON());
            }
        }
        public string SelectProductDataForTargetWeek(int PgID, int ObjID, string ProdType, string ProdCode, int WeekNbr, int Rollup, int RollProd, int NoLoc, int NoCust, int NoForecast, int NoOrd, int NoProd, int Sort, int PgNbr, int PgSize, int ByID)
        {
            Commands cmd     = new Commands();
            string   s       = string.Empty;
            int      iResult = 0;

            try
            {
                SalesFunctions sf = new SalesFunctions();
                DataTable      dt = sf.SelectProductDataForTargetWeek(ProdType, ProdCode, WeekNbr, Rollup, RollProd, NoLoc, NoCust, NoForecast, NoOrd, NoProd, Sort, PgNbr, PgSize, ByID);
                s       = GenUtilities.JSON(dt);
                iResult = cmd.LogAjaxCall(PgID, ObjID, 1, "SelectProductDataForTargetWeek", s.Length, ByID);
                return(s);
            }
            catch (Exception ex)
            {
                iResult = cmd.LogApplicationError("Sales Grp List", 0, ByID, ex.Message, 0, "SelectProductDataForTargetWeek function", ByID);
                JavaScriptSerializer js = new JavaScriptSerializer();
                var response            = new { success = "false", message = ex.Message };
                return(response.ToJSON());
            }
        }
        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());
            }
        }
Ejemplo n.º 26
0
        public string SelectVendorList(int PgID, int ObjID, string Seed, int Sort, int Min, int ByID)
        {
            Commands cmd     = new Commands();
            string   s       = string.Empty;
            int      iResult = 0;

            try
            {
                InvoiceLib il = new InvoiceLib();
                DataTable  dt = il.SelectVendorList(Seed, Sort, Min, ByID);
                s       = GenUtilities.JSON(dt);
                iResult = cmd.LogAjaxCall(PgID, ObjID, 1, "SelectVendorList", s.Length, ByID);
                return(s);
            }
            catch (Exception ex)
            {
                iResult = cmd.LogApplicationError("Vendor List", 0, ByID, ex.Message, 0, "SelectVendorList function", ByID);
                JavaScriptSerializer js = new JavaScriptSerializer();
                var response            = new { success = "false", message = ex.Message };
                return(response.ToJSON());
            }
        }
Ejemplo n.º 27
0
        public static string GetTotalsRow(double[] totals, string lbl, int NbrPreCols, int LblCol, int prec)
        {
            var sb = new StringBuilder();

            if (LblCol > 0)
            {
                for (int c = 0; c < LblCol; c++)
                {
                    sb.Append(",");
                }
            }
            sb.Append(lbl + ",");
            for (int c = LblCol + 1; c < NbrPreCols; c++)
            {
                sb.Append(",");
            }
            for (int i = 0; i <= 17; i++)
            {
                sb.Append("," + GenUtilities.FormatNbrSpecial(totals[i], "", 1, ",", ".", prec));
            }
            return(sb.ToString());
        }
        public string SelectDocTypeAssociations(int PgID, int ObjID, string DocTypeCode, int iType, int ByID)
        {
            Commands cmd     = new Commands();
            string   s       = string.Empty;
            int      iResult = 0;

            try
            {
                DocsForms df = new DocsForms();
                DataTable dt = df.SelectDocTypeAssociations(DocTypeCode, iType, ByID);
                s       = GenUtilities.JSON(dt);
                iResult = cmd.LogAjaxCall(PgID, ObjID, 1, "SelectDocTypeAssociations", s.Length, ByID);
                return(s);
            }
            catch (Exception ex)
            {
                iResult = cmd.LogApplicationError("Doc Type Assocs", 0, ByID, ex.Message, 0, "SelectDocTypeAssociations function", ByID);
                JavaScriptSerializer js = new JavaScriptSerializer();
                var response            = new { success = "false", message = ex.Message };
                return(response.ToJSON());
            }
        }
        public string SelectSalesPersonList(int PgID, int ObjID, int Active, int ByID)
        {
            Commands cmd     = new Commands();
            string   s       = string.Empty;
            int      iResult = 0;

            try
            {
                SalesFunctions sf = new SalesFunctions();
                DataTable      dt = sf.SelectSalesPersonList(Active, ByID);
                s       = GenUtilities.JSON(dt);
                iResult = cmd.LogAjaxCall(PgID, ObjID, 1, "SelectSalesPersonList", s.Length, ByID);
                return(s);
            }
            catch (Exception ex)
            {
                iResult = cmd.LogApplicationError("Sales Pers List", 0, ByID, ex.Message, 0, "SelectSalesPersonList 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());
            }
        }