Ejemplo n.º 1
0
        public static ST_Measurement GetMeasurementField()
        {
            ST_Measurement Measur = new ST_Measurement();
            LoginUser      currentUser;

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

                CustomerManager adminObj = new CustomerManager();
                if (!adminObj.GetMeasurementField(currentUser.CompanyID, currentUser.UserId, out Measur))
                {
                    Measur.ErrorCode    = adminObj.GetLastErrorCode();
                    Measur.ErrorMessage = adminObj.GetLastError();
                }
            }
            catch (Exception ex)
            {
                Measur.ErrorCode    = -4;
                Measur.ErrorMessage = "Unknown Error Occured";
                Utils.Write(ex);
            }

            return(Measur);
        }
Ejemplo n.º 2
0
        public static ST_Measurement GetMeasurementMaster(string MeasurMasterID, bool isPrint, string InvoiceID)
        {
            ST_Measurement Measur = new ST_Measurement();
            LoginUser      currentUser;

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

                CustomerManager adminObj = new CustomerManager();
                if (!adminObj.GetMeasurementMaster(currentUser.CompanyID, currentUser.UserId, string.IsNullOrEmpty(MeasurMasterID) ? 0 : Convert.ToInt32(MeasurMasterID), out Measur, isPrint, string.IsNullOrEmpty(InvoiceID) ? 0 : Convert.ToInt32(InvoiceID)))
                {
                    Measur.ErrorCode    = adminObj.GetLastErrorCode();
                    Measur.ErrorMessage = adminObj.GetLastError();
                }
            }
            catch (Exception ex)
            {
                Measur.ErrorCode    = -4;
                Measur.ErrorMessage = "Unknown Error Occured";
                Utils.Write(ex);
            }

            return(Measur);
        }