コード例 #1
0
        public ListResponeMessage <AnalyzerGroupInfo> GetListWithCondition(
            string AnalyzerGroupCode,
            string quoteCode,
            string contractCode,
            DateTime fromDate, DateTime toDate, int pageSize = 10, int pageIndex = 0)
        {
            ListResponeMessage <AnalyzerGroupInfo> ret = new ListResponeMessage <AnalyzerGroupInfo>();

            try
            {
                AnalyzerGroupSeachCriteria _criteria = new AnalyzerGroupSeachCriteria();
                _criteria.AnalyzerGroupCode = AnalyzerGroupCode;
                _criteria.pageSize          = pageSize;
                _criteria.pageIndex         = pageIndex;

                ret.isSuccess    = true;
                ret.data         = AnalyzerGroupService.GetInstance().getAllAnalyzerGroup(_criteria);
                ret.totalRecords = AnalyzerGroupService.GetInstance().getTotalRecords(_criteria);
            }
            catch (Exception ex)
            {
                ret.isSuccess     = false;
                ret.err.msgCode   = "005";
                ret.err.msgString = ex.ToString();
            }
            return(ret);
        }
コード例 #2
0
ファイル: QuoteController.cs プロジェクト: yeupanhmaj/TMHH
        public ListResponeMessage <QuoteInfo> GetListWithCondition(string quoteCode    = "",
                                                                   string proposalCode = "", int customerID = 0, DateTime?fromDate = null,
                                                                   DateTime?toDate     = null, int pageSize = 10, int pageIndex    = 0, string _userID = "")
        {
            ListResponeMessage <QuoteInfo> ret = new ListResponeMessage <QuoteInfo>();

            try
            {
                QuoteSeachCriteria _criteria = new QuoteSeachCriteria();
                _criteria.ProposalCode = proposalCode;
                _criteria.QuoteCode    = quoteCode;
                _criteria.CustomerID   = customerID;
                _criteria.FromDate     = fromDate;
                _criteria.ToDate       = toDate;
                _criteria.pageSize     = pageSize;
                _criteria.pageIndex    = pageIndex;

                ret.isSuccess    = true;
                ret.data         = QuoteService.GetInstance().getAllQuote(pageSize, pageIndex, _criteria, _userID);
                ret.totalRecords = ret.data.Count;
            }
            catch (Exception ex)
            {
                ret.isSuccess     = false;
                ret.err.msgCode   = "005";
                ret.err.msgString = ex.ToString();
            }
            return(ret);
        }
コード例 #3
0
ファイル: GateListController.cs プロジェクト: yeupanhmaj/test
 public ListResponeMessage <GateViewModel> GetGateList([FromHeader] string key, [FromHeader] string token)
 {
     if (Encrypt.checkToken(token, key))
     {
         ListResponeMessage <GateViewModel> ret = new ListResponeMessage <GateViewModel>();
         try
         {
             ret.isSuccess = true;
             ret.data      = GateListService.GetInstance().GetGateList();
         }
         catch (Exception ex)
         {
             ret.isSuccess     = false;
             ret.err.msgCode   = "005";
             ret.err.msgString = ex.ToString();
         }
         return(ret);
     }
     else
     {
         ListResponeMessage <GateViewModel> ret = new ListResponeMessage <GateViewModel>();
         ret.isSuccess     = false;
         ret.err.msgCode   = "Internal Error !!!";
         ret.err.msgString = "Key hoặc token không chính xác";
         return(ret);
     }
 }
コード例 #4
0
ファイル: AnalyzerController.cs プロジェクト: yeupanhmaj/TMHH
        public ListResponeMessage <AnalyzerInfo> GetListWithCondition(
            string analyzerCode, string departmentID, string customerID,
            DateTime fromDate, DateTime toDate, int pageSize = 10, int pageIndex = 0)
        {
            ListResponeMessage <AnalyzerInfo> ret = new ListResponeMessage <AnalyzerInfo>();

            try
            {
                AnalyzerSeachCriteria _criteria = new AnalyzerSeachCriteria();
                _criteria.AnalyzerCode = analyzerCode;
                _criteria.DepartmentID = departmentID;
                _criteria.CustomerID   = customerID;
                _criteria.FromDate     = fromDate;
                _criteria.ToDate       = toDate;
                _criteria.pageSize     = pageSize;
                _criteria.pageIndex    = pageIndex;


                ret.data         = AnalyzerService.GetInstance().getAllAnalyzer(pageSize, pageIndex, _criteria);
                ret.totalRecords = AnalyzerService.GetInstance().getTotalRecords(_criteria);
                ret.isSuccess    = true;
            }
            catch (Exception ex)
            {
                ret.isSuccess     = false;
                ret.err.msgCode   = "005";
                ret.err.msgString = ex.ToString();
            }
            return(ret);
        }
コード例 #5
0
        public ListResponeMessage <NegotiationInfo> GetListWithCondition(
            string negotiationCode,
            string quoteCode,
            int customerID,
            DateTime fromDate, DateTime toDate, int pageSize = 10, int pageIndex = 0, string _userID = "")
        {
            ListResponeMessage <NegotiationInfo> ret = new ListResponeMessage <NegotiationInfo>();

            try
            {
                NegotiationSeachCriteria _criteria = new NegotiationSeachCriteria();
                _criteria.QuoteCode       = quoteCode;
                _criteria.NegotiationCode = negotiationCode;
                _criteria.CustomerID      = customerID;
                _criteria.FromDate        = Helpers.Utils.StartOfDate(fromDate);
                _criteria.ToDate          = Helpers.Utils.EndOfDate(toDate);
                _criteria.pageSize        = pageSize;
                _criteria.pageIndex       = pageIndex;

                ret.isSuccess    = true;
                ret.data         = NegotiationService.GetInstance().getAllNegotiation(pageSize, pageIndex, _criteria, _userID);
                ret.totalRecords = NegotiationService.GetInstance().getTotalRecords(_criteria, _userID);
            }
            catch (Exception ex)
            {
                ret.isSuccess     = false;
                ret.err.msgCode   = "005";
                ret.err.msgString = ex.ToString();
            }
            return(ret);
        }
コード例 #6
0
        public ListResponeMessage <BidPlanInfo> GetListWithCondition(
            string bidPlanCode,
            string quoteCode,
            int customerID,
            DateTime fromDate, DateTime toDate, string _userID, int pageSize = 10, int pageIndex = 0)
        {
            ListResponeMessage <BidPlanInfo> ret = new ListResponeMessage <BidPlanInfo>();

            try
            {
                BidPlanSeachCriteria _criteria = new BidPlanSeachCriteria();
                _criteria.BidPlanCode = bidPlanCode;
                _criteria.QuoteCode   = quoteCode;
                _criteria.CustomerID  = customerID;
                _criteria.FromDate    = fromDate;
                _criteria.ToDate      = toDate;
                _criteria.pageSize    = pageSize;
                _criteria.pageIndex   = pageIndex;

                ret.isSuccess    = true;
                ret.data         = BidPlanService.GetInstance().getAllBidPlan(pageSize, pageIndex, _criteria, _userID);
                ret.totalRecords = BidPlanService.GetInstance().getTotalRecords(_criteria, _userID);
            }
            catch (Exception ex)
            {
                ret.isSuccess     = false;
                ret.err.msgCode   = "005";
                ret.err.msgString = ex.ToString();
            }
            return(ret);
        }
コード例 #7
0
ファイル: AnalyzerController.cs プロジェクト: yeupanhmaj/TMHH
        public ListResponeMessage <AnalyzerInfo> GetAnalyzerByDate([FromQuery] AnalyzerSeachCriteria _criteria)
        {
            ListResponeMessage <AnalyzerInfo> ret = new ListResponeMessage <AnalyzerInfo>();

            try
            {
                List <AnalyzerInfo> item = AnalyzerService.GetInstance().GetAnalyzerByDate(_criteria);
                if (item == null)
                {
                    ret.isSuccess     = false;
                    ret.err.msgCode   = "001";
                    ret.err.msgString = "no Analyzer found";
                    return(ret);
                }
                ret.data      = item;
                ret.isSuccess = true;
            }
            catch (Exception ex)
            {
                ret.isSuccess     = false;
                ret.err.msgCode   = "Internal Error !!!";
                ret.err.msgString = ex.ToString();
            }
            return(ret);
        }
コード例 #8
0
        public ListResponeMessage <EmployeeRoleInfo> GetAll()
        {
            ListResponeMessage <EmployeeRoleInfo> ret = new ListResponeMessage <EmployeeRoleInfo>();

            ret.data      = EmployeeRoleServices.GetInstance().getAllEmployeeRole();
            ret.isSuccess = true;

            return(ret);
        }
コード例 #9
0
        public ListResponeMessage <CapitalInfo> GetByName(string name)
        {
            ListResponeMessage <CapitalInfo> ret = new ListResponeMessage <CapitalInfo>();

            ret.data      = CapitalServices.GetInstance().GetByName(name);
            ret.isSuccess = true;

            return(ret);
        }
コード例 #10
0
        public ListResponeMessage <CapitalInfo> GetAll()
        {
            ListResponeMessage <CapitalInfo> ret = new ListResponeMessage <CapitalInfo>();

            ret.data      = CapitalServices.GetInstance().getAllCapital();
            ret.isSuccess = true;

            return(ret);
        }
コード例 #11
0
        public ListResponeMessage <ItemInfo> GetAll()
        {
            ListResponeMessage <ItemInfo> ret = new ListResponeMessage <ItemInfo>();

            // ret.data = ItemsService.getAllItems();
            ret.isSuccess = true;

            return(ret);
        }
コード例 #12
0
ファイル: AnalyzerController.cs プロジェクト: yeupanhmaj/TMHH
        public ListResponeMessage <AnalyzerInfo> GetList(int pageSize = 10, int pageIndex = 0)
        {
            ListResponeMessage <AnalyzerInfo> ret = GetListWithCondition(
                "",
                "",
                "",
                Helpers.Utils.StartOfMonth(DateTime.Now),
                Helpers.Utils.EndOfDate(DateTime.Now),
                pageSize,
                pageIndex);

            return(ret);
        }
コード例 #13
0
        public ListResponeMessage <BidPlanInfo> GetList(int pageSize = 10, int pageIndex = 0)
        {
            ListResponeMessage <BidPlanInfo> ret = GetListWithCondition(
                "",
                "",
                0,
                Helpers.Utils.StartOfDate(DateTime.Now),
                Helpers.Utils.EndOfDate(DateTime.Now),
                "",
                10,
                0);

            return(ret);
        }
コード例 #14
0
ファイル: QuoteController.cs プロジェクト: yeupanhmaj/TMHH
        public ListResponeMessage <ItemInfo> getItems(int QuoteID, int CustomerID)
        {
            ListResponeMessage <ItemInfo> ret = new ListResponeMessage <ItemInfo>();

            try
            {
                ret.data      = QuoteService.GetInstance().getItemsQuote(QuoteID, CustomerID);
                ret.isSuccess = true;
            }
            catch (Exception ex)
            {
                ret.isSuccess     = false;
                ret.err.msgCode   = "Internal Error !!!";
                ret.err.msgString = ex.ToString();
            }
            return(ret);
        }
コード例 #15
0
        public ListResponeMessage <UserGroupInfo> GetListGroupsOfUser(string userID)
        {
            ListResponeMessage <UserGroupInfo> ret = new ListResponeMessage <UserGroupInfo>();

            try
            {
                ret.isSuccess = true;
                ret.data      = UserGroupService.GetInstance().GetListGroupOfUser(userID);
            }
            catch (Exception ex)
            {
                ret.isSuccess     = false;
                ret.err.msgCode   = "005";
                ret.err.msgString = ex.ToString();
            }
            return(ret);
        }
コード例 #16
0
        public ListResponeMessage <NegotiationLstcb> GetListNegotiationByCode(string code = "")
        {
            ListResponeMessage <NegotiationLstcb> ret = new ListResponeMessage <NegotiationLstcb>();

            try
            {
                ret.isSuccess = true;
                ret.data      = NegotiationService.GetInstance().GetListNegotiationByCode(code);
            }
            catch (Exception ex)
            {
                ret.isSuccess     = false;
                ret.err.msgCode   = "Internal Error !!!";
                ret.err.msgString = ex.ToString();
            }
            return(ret);
        }
コード例 #17
0
ファイル: ContractController.cs プロジェクト: yeupanhmaj/TMHH
        public ListResponeMessage <ContractSelectItem> GetContractSelectItem(string code, string _userID)
        {
            ListResponeMessage <ContractSelectItem> ret = new ListResponeMessage <ContractSelectItem>();

            try
            {
                ret.data      = ContractService.GetInstance().GetContractSelectItem(code, _userID);
                ret.isSuccess = true;
            }
            catch (Exception ex)
            {
                ret.isSuccess     = false;
                ret.err.msgCode   = "Internal Error !!!";
                ret.err.msgString = ex.ToString();
            }
            return(ret);
        }
コード例 #18
0
ファイル: AuditController.cs プロジェクト: yeupanhmaj/TMHH
        public ListResponeMessage <AuditEmployeeInfo> GetDefaultMember()
        {
            ListResponeMessage <AuditEmployeeInfo> ret = new ListResponeMessage <AuditEmployeeInfo>();

            try
            {
                ret.isSuccess = true;
                ret.data      = AuditService.GetInstance().GetAuditDefaultMember();
            }
            catch (Exception ex)
            {
                ret.isSuccess     = false;
                ret.err.msgCode   = "Internal Error !!!";
                ret.err.msgString = ex.ToString();
            }
            return(ret);
        }
コード例 #19
0
        public ListResponeMessage <ItemInfo> GetListItem(string name = "", string code = "")
        {
            ListResponeMessage <ItemInfo> ret = new ListResponeMessage <ItemInfo>();

            try
            {
                ret.data      = ItemsServices.GetInstance().GetItemsByCondition(name, code);
                ret.isSuccess = true;
            }
            catch (Exception ex)
            {
                ret.isSuccess     = false;
                ret.err.msgCode   = "Internal Error !!!";
                ret.err.msgString = ex.ToString();
            }
            return(ret);
        }
コード例 #20
0
        public ListResponeMessage <CategoryInfo> GetListCategory()
        {
            ListResponeMessage <CategoryInfo> ret = new ListResponeMessage <CategoryInfo>();

            try
            {
                ret.isSuccess = true;
                ret.data      = CategoryService.GetInstance().GetListCategory();
            }
            catch (Exception ex)
            {
                ret.isSuccess     = false;
                ret.err.msgCode   = "005";
                ret.err.msgString = ex.ToString();
            }
            return(ret);
        }
コード例 #21
0
        public ListResponeMessage <UserGroupPermission> Get(int groupID)
        {
            ListResponeMessage <UserGroupPermission> ret = new ListResponeMessage <UserGroupPermission>();

            try
            {
                ret.isSuccess = true;
                ret.data      = UserGroupService.GetInstance().GetListGroupPermission(groupID);
            }
            catch (Exception ex)
            {
                ret.isSuccess     = false;
                ret.err.msgCode   = "005";
                ret.err.msgString = ex.ToString();
            }
            return(ret);
        }
コード例 #22
0
ファイル: QuoteController.cs プロジェクト: yeupanhmaj/TMHH
        public ListResponeMessage <SelectItem> getListQuoteCode(string quoteCode = "", bool isContract = false)
        {
            ListResponeMessage <SelectItem> ret = new ListResponeMessage <SelectItem>();

            try
            {
                ret.isSuccess = true;
                ret.data      = QuoteService.GetInstance().getListQuoteCode(quoteCode, isContract);
            }
            catch (Exception ex)
            {
                ret.isSuccess     = false;
                ret.err.msgCode   = "Internal Error !!!";
                ret.err.msgString = ex.ToString();
            }
            return(ret);
        }
コード例 #23
0
ファイル: QuoteController.cs プロジェクト: yeupanhmaj/TMHH
        public ListResponeMessage <SelectItem> getListquoteCodeCanCreateDecision(string quoteCode = "")
        {
            ListResponeMessage <SelectItem> ret = new ListResponeMessage <SelectItem>();

            try
            {
                ret.isSuccess = true;
                ret.data      = QuoteService.GetInstance().getListquoteCodeCanCreateDecision(quoteCode);
            }
            catch (Exception ex)
            {
                ret.isSuccess     = false;
                ret.err.msgCode   = "Internal Error !!!";
                ret.err.msgString = ex.ToString();
            }
            return(ret);
        }
コード例 #24
0
        public ListResponeMessage <ProposalSelectItem> getListProsalCanCreateDR(string code)
        {
            ListResponeMessage <ProposalSelectItem> ret = new ListResponeMessage <ProposalSelectItem>();

            try
            {
                ret.data      = ProposalService.GetInstance().getListProsalCanCreateDR(code);
                ret.isSuccess = true;
            }
            catch (Exception ex)
            {
                ret.isSuccess     = false;
                ret.err.msgCode   = "Internal Error !!!";
                ret.err.msgString = ex.ToString();
            }
            return(ret);
        }
コード例 #25
0
ファイル: AnalyzerController.cs プロジェクト: yeupanhmaj/TMHH
        public ListResponeMessage <string> getListAnalyzerCode(string AnalyzerCode = "")
        {
            ListResponeMessage <string> ret = new ListResponeMessage <string>();

            try
            {
                ret.isSuccess = true;
                ret.data      = AnalyzerService.GetInstance().getListAnalyzerCode(AnalyzerCode);
            }
            catch (Exception ex)
            {
                ret.isSuccess     = false;
                ret.err.msgCode   = "Internal Error !!!";
                ret.err.msgString = ex.ToString();
            }
            return(ret);
        }
コード例 #26
0
ファイル: QuoteController.cs プロジェクト: yeupanhmaj/TMHH
        public ListResponeMessage <int> getExitsQuote([FromBody] QuoteCreateRequest QuoteObj)
        {
            ListResponeMessage <int> ret = new ListResponeMessage <int>();

            try
            {
                ret.data      = QuoteService.GetInstance().getExitsQuoteProposal(QuoteObj, this.GetUserId());
                ret.isSuccess = true;
            }
            catch (Exception ex)
            {
                ret.isSuccess     = false;
                ret.err.msgCode   = "Internal Error !!!";
                ret.err.msgString = ex.ToString();
            }
            return(ret);
        }
コード例 #27
0
ファイル: QuoteController.cs プロジェクト: yeupanhmaj/TMHH
        public ListResponeMessage <searchProposalItemRespone> searchQuoteItem(string text)
        {
            ListResponeMessage <searchProposalItemRespone> ret = new ListResponeMessage <searchProposalItemRespone>();

            try
            {
                ret.data      = QuoteService.GetInstance().searchQuoteItem(text);
                ret.isSuccess = true;
            }
            catch (Exception ex)
            {
                ret.isSuccess     = false;
                ret.err.msgCode   = "Internal Error !!!";
                ret.err.msgString = ex.ToString();
            }
            return(ret);
        }
コード例 #28
0
        public ListResponeMessage <StatusCountReport> CountByStatus()
        {
            ListResponeMessage <StatusCountReport> ret = new ListResponeMessage <StatusCountReport>();

            try
            {
                ret.data      = ProposalService.GetInstance().GetCountByStatus();
                ret.isSuccess = true;
            }
            catch (Exception ex)
            {
                ret.isSuccess     = false;
                ret.err.msgCode   = "Internal Error !!!";
                ret.err.msgString = ex.ToString();
            }
            return(ret);
        }
コード例 #29
0
        public ListResponeMessage <AcceptanceInfo> GetList([FromQuery] AcceptanceCriteria criteria, string _userID)
        {
            ListResponeMessage <AcceptanceInfo> ret = new ListResponeMessage <AcceptanceInfo>();

            try
            {
                ret.isSuccess    = true;
                ret.data         = AcceptanceServices.GetInstance().GetList(criteria, _userID);
                ret.totalRecords = AcceptanceServices.GetInstance().getTotalRecords(criteria, _userID);
            }
            catch (Exception ex)
            {
                ret.isSuccess     = false;
                ret.err.msgCode   = "005";
                ret.err.msgString = ex.ToString();
            }
            return(ret);
        }
コード例 #30
0
ファイル: CustomerController.cs プロジェクト: yeupanhmaj/TMHH
        public ListResponeMessage <CustomerInfo> GetList(int pageSize = 10, int pageIndex = 0)
        {
            ListResponeMessage <CustomerInfo> ret = new ListResponeMessage <CustomerInfo>();

            try
            {
                ret.isSuccess    = true;
                ret.data         = CustomerService.GetInstance().getAllCustomer(pageSize, pageIndex);
                ret.totalRecords = CustomerService.GetInstance().getTotalRecords(ret.data);
            }
            catch (Exception ex)
            {
                ret.isSuccess     = false;
                ret.err.msgCode   = "005";
                ret.err.msgString = ex.ToString();
            }
            return(ret);
        }