Exemplo n.º 1
0
        public static Struct_Company GetCompanyAndBranchList()
        {
            Struct_Company records = new Struct_Company();

            TailerApp.Common.LoginUser currentUser;
            try
            {
                if (!GetUserSession(out currentUser))
                {
                    records.errorCode    = 1001;
                    records.errorMessage = "";
                }

                AdminManagerSP AdminManager = new AdminManagerSP();
                if (!AdminManager._C_GetCompanyAndBranchList(0, currentUser.UserId, out records))
                {
                    records.errorCode    = AdminManager.GetLastErrorCode();
                    records.errorMessage = AdminManager.GetLastError();
                }
                return(records);
            }
            catch (Exception ee)
            {
                records.errorCode    = -5;
                records.errorMessage = "Unknown Error occured while canceling Schedules.";
            }
            return(records);
        }
Exemplo n.º 2
0
        public static Struct_Company GetCompanyDetails(string CompanyID)
        {
            Struct_Company OutPutData = new Struct_Company();

            TailerApp.Common.LoginUser currentUser;
            try
            {
                if (!GetUserSession(out currentUser))
                {
                    OutPutData.errorCode    = 10001;
                    OutPutData.errorMessage = "";
                }

                AdminManagerSP AdminManager = new AdminManagerSP();
                if (!AdminManager._C_GetCompanyDetails(string.IsNullOrEmpty(CompanyID) ? 0 : Convert.ToInt32(CompanyID), currentUser.UserId, out OutPutData))
                {
                    OutPutData.errorCode    = AdminManager.GetLastErrorCode();
                    OutPutData.errorMessage = AdminManager.GetLastError();
                }
                return(OutPutData);
            }
            catch (Exception e)
            {
                OutPutData.errorCode    = -4;
                OutPutData.errorMessage = "Unknown Error Occured";
                Utils.Write(e);
            }
            return(OutPutData);
        }