public static ItemMasterList GetItemDetails(int itemMasterID)
        {
            ItemMasterList returnObj = new ItemMasterList();
            LoginUser      currentUser;

            try
            {
                if (!GetUserSession(out currentUser))
                {
                    returnObj.ErrorCode    = -1001;
                    returnObj.ErrorMessage = "";
                }

                AdminManagerSP customerObj = new AdminManagerSP();
                if (customerObj.GetItemMasterList(currentUser.CompanyID, currentUser.UserId, itemMasterID, out returnObj))
                {
                    returnObj.ErrorCode    = 0;
                    returnObj.ErrorMessage = "";
                }
                else
                {
                    returnObj.ErrorCode    = -1;
                    returnObj.ErrorMessage = "Failed to get Item Details. please try again later";
                }
            }
            catch (Exception ex)
            {
                Utils.Write(ex);
            }

            return(returnObj);
        }
Esempio n. 2
0
        public static ItemMasterList GetItemList(string InvoiceID)
        {
            ItemMasterList returnObj = new ItemMasterList();
            LoginUser      currentUser;

            try
            {
                if (!GetUserSession(out currentUser))
                {
                    returnObj.ErrorCode    = 1001;
                    returnObj.ErrorMessage = "";
                    return(returnObj);
                }

                AdminManagerSP customerObj = new AdminManagerSP();
                if (customerObj.GetItemMasterList(currentUser.CompanyID, currentUser.UserId, 0, out returnObj, string.IsNullOrEmpty(InvoiceID) ? 0 : Convert.ToInt32(InvoiceID)))
                {
                    returnObj.ErrorCode    = 0;
                    returnObj.ErrorMessage = "";
                }
                else
                {
                    returnObj.ErrorCode    = -1;
                    returnObj.ErrorMessage = "Failed to get Item Details. please try again later";
                }
            }
            catch (Exception ex)
            {
                Utils.Write(ex);
            }

            return(returnObj);
        }