Exemplo n.º 1
0
        /// <summary>
        /// Get Invoice List
        /// </summary>
        /// <returns></returns>
        public IEnumerable <InvoiceModel> getInvoiceList(string sortBy, int pageSize, Int64 skip, string AnchorCompanyName, string InvoiceStatus, string ConditionParam, int?CompanyID, Int64?VendorId)
        {
            try
            {
                RepositoryService <InvoiceModel> objInvoiceModel = new RepositoryService <InvoiceModel>(_vContext);
                ICollection <SqlParameter>       parameters      = new List <SqlParameter>();
                parameters.Add(SQLHelper.SqlInputParam("@sortBy", sortBy, System.Data.SqlDbType.VarChar));
                parameters.Add(SQLHelper.SqlInputParam("@PageSize", pageSize, System.Data.SqlDbType.VarChar));
                parameters.Add(SQLHelper.SqlInputParam("@Skip", skip, System.Data.SqlDbType.VarChar));
                parameters.Add(SQLHelper.SqlInputParam("@AnchorCompanyName", AnchorCompanyName, System.Data.SqlDbType.VarChar));
                parameters.Add(SQLHelper.SqlInputParam("@InvoiceStatus", InvoiceStatus, System.Data.SqlDbType.VarChar));
                parameters.Add(SQLHelper.SqlInputParam("@PONumber", "", System.Data.SqlDbType.VarChar));
                parameters.Add(SQLHelper.SqlInputParam("@InvoiceNo", "", System.Data.SqlDbType.VarChar));
                parameters.Add(SQLHelper.SqlInputParam("@CompanyId", CompanyID, System.Data.SqlDbType.Int));
                parameters.Add(SQLHelper.SqlInputParam("@IsDiscountNull", ConditionParam == "VDashboardScreen" ? 3:1, System.Data.SqlDbType.SmallInt));//Here 1 and 3 are decision making parametres.It's definition is in sql
                parameters.Add(SQLHelper.SqlInputParam("@VendorID", VendorId, System.Data.SqlDbType.BigInt));

                var data = objInvoiceModel.ExecWithStoreProcedure("proc_GetInvoiceDet  @Skip, @PageSize, @sortBy, @AnchorCompanyName, @InvoiceStatus,@PONumber,@InvoiceNo,@CompanyId,@IsDiscountNull,@VendorID", parameters.ToArray());
                IEnumerable <InvoiceModel> lstInvoice = data.ToList();
                return(lstInvoice);
            }
            catch (Exception ex)
            {
                //dbErrorLogging.LogError(ex);
                throw ex;
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Validate AnchorComp User
        /// </summary>
        /// <param name="UserID"></param>
        /// <returns></returns>
        public bool ValidateAnchorCompUser(Int32?UserID, string FileName)
        {
            bool IsValidUser = false;

            try
            {
                AnchorCompanyDocument vendorDocument = new AnchorCompanyDocument();
                RepositoryService <AnchorCompanyDocument> objAnchorCompanyDocument = new RepositoryService <AnchorCompanyDocument>(_vContext);
                ICollection <SqlParameter> parameters = new List <SqlParameter>();
                parameters.Add(SQLHelper.SqlInputParam("@UserID", UserID, System.Data.SqlDbType.Int));
                parameters.Add(SQLHelper.SqlInputParam("@FileName", FileName, System.Data.SqlDbType.VarChar));

                var data = objAnchorCompanyDocument.ExecWithStoreProcedure("proc_GetAnchorCompDocUser  @UserID,@FileName", parameters.ToArray());
                IEnumerable <AnchorCompanyDocument> lstAnchorCompDocUser = data.ToList();
                if (lstAnchorCompDocUser.Count() > 0)
                {
                    IsValidUser = true;
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(IsValidUser);
        }
Exemplo n.º 3
0
        /// <summary>
        /// Get upload vendor list
        /// </summary>
        /// <param name="CompanyID"></param>
        /// <param name="VendorId"></param>
        /// <param name="POName"></param>
        /// <param name="InvoiveNo"></param>
        /// <param name="sortBy"></param>
        /// <param name="pageSize"></param>
        /// <param name="skip"></param>
        /// <returns></returns>
        public IEnumerable <GetUploadVendorListModel> GetUploadVendorList(Int64?CompanyID, string VendorID, Int64?AnchorCompID, string POName, string InvoiceDate, string INVOICENO, string InvoiceAmt, string ApprovedAmt, string InvoiceStatus, string PaymentDays, string sortBy, int pageSize, Int64 skip)
        {
            RepositoryService <GetUploadVendorListModel> objGetUploadVendorListModel = new RepositoryService <GetUploadVendorListModel>(_vContext);

            try
            {
                ICollection <SqlParameter> parameters = new List <SqlParameter>();
                parameters.Add(SQLHelper.SqlInputParam("@VendorId", VendorID, System.Data.SqlDbType.VarChar));
                parameters.Add(SQLHelper.SqlInputParam("@CompanyID", CompanyID, System.Data.SqlDbType.VarChar));
                parameters.Add(SQLHelper.SqlInputParam("@AnchorCompID", AnchorCompID, System.Data.SqlDbType.VarChar));
                parameters.Add(SQLHelper.SqlInputParam("@sortBy", sortBy, System.Data.SqlDbType.VarChar));
                parameters.Add(SQLHelper.SqlInputParam("@pageSize", pageSize, System.Data.SqlDbType.VarChar));
                parameters.Add(SQLHelper.SqlInputParam("@skip", skip, System.Data.SqlDbType.VarChar));
                parameters.Add(SQLHelper.SqlInputParam("@POName", POName, System.Data.SqlDbType.VarChar));
                parameters.Add(SQLHelper.SqlInputParam("@InvoiceDate", InvoiceDate, System.Data.SqlDbType.VarChar));
                parameters.Add(SQLHelper.SqlInputParam("@InvoiceNO", INVOICENO, System.Data.SqlDbType.VarChar));
                parameters.Add(SQLHelper.SqlInputParam("@InvoiceAmt", InvoiceAmt, System.Data.SqlDbType.VarChar));
                parameters.Add(SQLHelper.SqlInputParam("@ApprovedAmt", ApprovedAmt, System.Data.SqlDbType.VarChar));
                parameters.Add(SQLHelper.SqlInputParam("@InvoiceStatus", InvoiceStatus, System.Data.SqlDbType.VarChar));
                parameters.Add(SQLHelper.SqlInputParam("@PaymentDays", PaymentDays, System.Data.SqlDbType.VarChar));

                var data = objGetUploadVendorListModel.ExecWithStoreProcedure("proc_UploadAllVendorListing @VendorId,@CompanyID,@AnchorCompID,@sortBy,@pageSize,@skip,@POName,@InvoiceDate," +
                                                                              "@InvoiceNO,@InvoiceAmt,@ApprovedAmt,@InvoiceStatus,@PaymentDays", parameters.ToArray());
                IEnumerable <GetUploadVendorListModel> lstComapany = data.ToList();
                return(lstComapany);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemplo n.º 4
0
        public EditSendGridDetailsModel SendGridEditPage()
        {
            EditSendGridDetailsModel objCompanyModels  = new EditSendGridDetailsModel();
            EditSendGridDetails      objCompanyModelss = new EditSendGridDetails();

            try
            {
                RepositoryService <EditSendGridDetailsModel> objCompany = new RepositoryService <EditSendGridDetailsModel>(_vContext);
                ICollection <SqlParameter> parameters = new List <SqlParameter>();
                parameters.Add(SQLHelper.SqlInputParam("@CompanyID", 0, System.Data.SqlDbType.Int));
                var data = objCompany.ExecWithStoreProcedure("proc_EditSendGridDetails  @CompanyID", parameters.ToArray());
                IEnumerable <EditSendGridDetailsModel> lstCompany = data.ToList();
                if (lstCompany != null && lstCompany.Count() != 0)
                {
                    objCompanyModels.UserId   = lstCompany.ElementAt(0).LookupValue;
                    objCompanyModels.Password = lstCompany.ElementAt(1).LookupValue;
                    objCompanyModels.HostName = lstCompany.ElementAt(2).LookupValue;
                    objCompanyModels.PortNO   = lstCompany.ElementAt(3).LookupValue;
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(objCompanyModels);
        }
Exemplo n.º 5
0
 /// <summary>
 /// Getting company listing
 /// </summary>
 /// <param name="sortBy"></param>
 /// <param name="pageSize"></param>
 /// <param name="skip"></param>
 /// <param name="CompanyName"></param>
 /// <param name="ContactPerson"></param>
 /// <returns></returns>
 public IEnumerable <GetCompanyModel> GetCompanyListing(string sortBy, int pageSize, Int64 skip, string CompanyName, string InterestedAs, string name)
 {
     try
     {
         RepositoryService <GetCompanyModel> obj        = new RepositoryService <GetCompanyModel>(_vContext);
         ICollection <SqlParameter>          parameters = new List <SqlParameter>();
         parameters.Add(SQLHelper.SqlInputParam("@sortBy", "" + sortBy + "", System.Data.SqlDbType.VarChar));
         parameters.Add(SQLHelper.SqlInputParam("@pageSize", "" + pageSize + "", System.Data.SqlDbType.VarChar));
         parameters.Add(SQLHelper.SqlInputParam("@skip", "" + skip + "", System.Data.SqlDbType.VarChar));
         parameters.Add(SQLHelper.SqlInputParam("@CompanyName", "" + CompanyName + "", System.Data.SqlDbType.VarChar));
         if (InterestedAs == "")
         {
             parameters.Add(SQLHelper.SqlInputParam("@InterestedAs", "" + 0 + "", System.Data.SqlDbType.Int));
         }
         else
         {
             parameters.Add(SQLHelper.SqlInputParam("@InterestedAs", "" + Convert.ToInt16(InterestedAs) + "", System.Data.SqlDbType.Int));
         }
         parameters.Add(SQLHelper.SqlInputParam("@name", "" + name + "", System.Data.SqlDbType.VarChar));
         var data = obj.ExecWithStoreProcedure("proc_GetCompanyList @sortBy,@pageSize,@skip,@CompanyName,@name,@InterestedAs", parameters.ToArray());
         IEnumerable <GetCompanyModel> lstAnchorCompListing = data.ToList();
         return(lstAnchorCompListing);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Exemplo n.º 6
0
        /// <summary>
        /// Check if pan number exists
        /// </summary>
        /// <param name="pan"></param>
        /// <returns></returns>
        public string CheckPan(string pan)
        {
            int?   isExist  = 0;
            string rolename = "";

            try
            {
                RepositoryService <CompanyCredentialsModel> objCompanyCredentialsModel = new RepositoryService <CompanyCredentialsModel>(_vContext);
                ICollection <SqlParameter> parameters = new List <SqlParameter>();
                parameters.Add(SQLHelper.SqlInputParam("@PanNumber", pan, System.Data.SqlDbType.VarChar));
                var result = objCompanyCredentialsModel.ExecWithStoreProcedure("proc_GetPan  @PanNumber", parameters.ToArray());
                IEnumerable <CompanyCredentialsModel> PanCheck = result.ToList();

                if (PanCheck.Count() != 0)
                {
                    //isExist = PanCheck.FirstOrDefault().IsExistPan;
                    rolename = PanCheck.FirstOrDefault().RoleAccess;
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(rolename);
        }
        public IEnumerable <AnchorCompListingModel> GetAnchorCompListingByVendorId(int?VendorId, string sortBy, int pageSize, Int64 skip, string CompanyID, string CompanyName, string TotalInvoiceAmt, string Page, int IsTotalCount)
        {
            try
            {
                RepositoryService <AnchorCompListingModel> objAnchorCompListingModel = new RepositoryService <AnchorCompListingModel>(_vContext);
                ICollection <SqlParameter> parameters = new List <SqlParameter>();
                // parameters.Add(SQLHelper.SqlInputParam("@Page", Page, System.Data.SqlDbType.VarChar));
                parameters.Add(SQLHelper.SqlInputParam("@VendorID", VendorId, System.Data.SqlDbType.Int));
                parameters.Add(SQLHelper.SqlInputParam("@Company_ID", CompanyID, System.Data.SqlDbType.VarChar));
                parameters.Add(SQLHelper.SqlInputParam("@Company_name", CompanyName, System.Data.SqlDbType.VarChar));
                parameters.Add(SQLHelper.SqlInputParam("@TotalAppInvAmt", TotalInvoiceAmt, System.Data.SqlDbType.VarChar));
                parameters.Add(SQLHelper.SqlInputParam("@SortBy", sortBy, System.Data.SqlDbType.VarChar));
                parameters.Add(SQLHelper.SqlInputParam("@PageSize", pageSize, System.Data.SqlDbType.VarChar));
                parameters.Add(SQLHelper.SqlInputParam("@Skip", skip, System.Data.SqlDbType.VarChar));
                parameters.Add(SQLHelper.SqlInputParam("@IsTotalCount", IsTotalCount, System.Data.SqlDbType.Int));

                var data = objAnchorCompListingModel.ExecWithStoreProcedure("Proc_GetAnchorCompListing  @Page, @VendorID, @Company_ID, @Company_name, @TotalAppInvAmt, @Skip, @PageSize, @sortBy, @IsTotalCount", parameters.ToArray());
                IEnumerable <AnchorCompListingModel> lstAnchorCompListing = data.ToList();
                return(lstAnchorCompListing);
            }
            catch (Exception ex)
            {
                //dbErrorLogging.LogError(ex);
                throw ex;
            }
        }
Exemplo n.º 8
0
        /// <summary>
        /// Edit page
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public Company ProfileEditPage(Int32?id)
        {
            Company objCompanyModels = new Company();

            try
            {
                RepositoryService <Company> objCompany = new RepositoryService <Company>(_vContext);
                ICollection <SqlParameter>  parameters = new List <SqlParameter>();
                parameters.Add(SQLHelper.SqlInputParam("@CompanyID", id, System.Data.SqlDbType.Int));
                var data = objCompany.ExecWithStoreProcedure("proc_EditCompany  @CompanyID", parameters.ToArray());
                IEnumerable <Company> lstCompany = data.ToList();
                foreach (var v in lstCompany)
                {
                    objCompanyModels.Company_name        = lstCompany.ElementAt(0).Company_name;
                    objCompanyModels.Contact_CIN         = lstCompany.ElementAt(0).Contact_CIN;
                    objCompanyModels.Contact_Comments    = lstCompany.ElementAt(0).Contact_Comments;
                    objCompanyModels.Pan_number          = lstCompany.ElementAt(0).Pan_number;
                    objCompanyModels.Contact_Name        = lstCompany.ElementAt(0).Contact_Name;
                    objCompanyModels.Contact_Designation = lstCompany.ElementAt(0).Contact_Designation;
                    objCompanyModels.Contact_email       = lstCompany.ElementAt(0).Contact_email;
                    objCompanyModels.Contact_mobile      = lstCompany.ElementAt(0).Contact_mobile;
                    objCompanyModels.InterestedAs        = lstCompany.ElementAt(0).InterestedAs;
                    objCompanyModels.Address             = lstCompany.ElementAt(0).Address;
                    objCompanyModels.Contact_Title       = lstCompany.ElementAt(0).Contact_Title;
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(objCompanyModels);
        }
Exemplo n.º 9
0
        /// <summary>
        /// get invoice approval record on edit
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public InvoiceApprovalOrderModel EditPage(int id)
        {
            InvoiceApprovalOrderModel objInvoiceApprovalModels = new InvoiceApprovalOrderModel();

            try
            {
                RepositoryService <InvoiceApprovalOrderModel> objInvoiceApprovalOrderModel = new RepositoryService <InvoiceApprovalOrderModel>(_vContext);
                ICollection <SqlParameter> parameters = new List <SqlParameter>();
                parameters.Add(SQLHelper.SqlInputParam("@ApprovalID", id, System.Data.SqlDbType.Int));
                var data = objInvoiceApprovalOrderModel.ExecWithStoreProcedure("proc_EditInvoiceApproved  @ApprovalID", parameters.ToArray());
                IEnumerable <InvoiceApprovalOrderModel> lstInvoiceApproval = data.ToList();
                foreach (var v in lstInvoiceApproval)
                {
                    objInvoiceApprovalModels.ApprovalID     = lstInvoiceApproval.ElementAt(0).ApprovalID;
                    objInvoiceApprovalModels.FromAmount     = lstInvoiceApproval.ElementAt(0).FromAmount;
                    objInvoiceApprovalModels.ToAmount       = lstInvoiceApproval.ElementAt(0).ToAmount;
                    objInvoiceApprovalModels.ApprovedBy     = lstInvoiceApproval.ElementAt(0).ApprovedBy;
                    objInvoiceApprovalModels.ApprovedByName = lstInvoiceApproval.ElementAt(0).ApprovedByName;
                    objInvoiceApprovalModels.Users          = lstInvoiceApproval.ElementAt(0).Users;
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(objInvoiceApprovalModels);
        }
Exemplo n.º 10
0
        /// <summary>
        /// Edit page by id
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public UserModel EditPage(int id)
        {
            UserModel objUserModels = new UserModel();

            try
            {
                RepositoryService <UserModel> objUserModel = new RepositoryService <UserModel>(_vContext);
                ICollection <SqlParameter>    parameters   = new List <SqlParameter>();
                parameters.Add(SQLHelper.SqlInputParam("@UserID", id, System.Data.SqlDbType.Int));
                var data = objUserModel.ExecWithStoreProcedure("proc_EditUser  @UserID", parameters.ToArray());
                IEnumerable <UserModel> lstUser = data.ToList();
                foreach (var v in lstUser)
                {
                    objUserModels.UserID       = lstUser.ElementAt(0).UserID;
                    objUserModels.Name         = lstUser.ElementAt(0).Name;
                    objUserModels.Mobile       = lstUser.ElementAt(0).Mobile;
                    objUserModels.Email        = lstUser.ElementAt(0).Email;
                    objUserModels.Designation  = lstUser.ElementAt(0).Designation;
                    objUserModels.RolesAccess  = lstUser.ElementAt(0).RolesAccess;
                    objUserModels.RoleAccessID = lstUser.ElementAt(0).RoleAccessID;
                    objUserModels.AccessViewID = lstUser.ElementAt(0).AccessViewID;
                    objUserModels.LookupValue  = lstUser.ElementAt(0).LookupValue;
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(objUserModels);
        }
Exemplo n.º 11
0
        /// <summary>
        /// Check if email id exists
        /// </summary>
        /// <param name="CustomFilter"></param>
        /// <returns></returns>

        public string CustomUserFilter(string controllername, string actionname, string RoleAccess, string Role)
        {
            string result = "0";

            try
            {
                RepositoryService <ActionFilter> objCompanyCredentialsModel = new RepositoryService <ActionFilter>(_vContext);
                ICollection <SqlParameter>       parameters = new List <SqlParameter>();
                parameters.Add(SQLHelper.SqlInputParam("@ControllerName", controllername, System.Data.SqlDbType.VarChar));
                parameters.Add(SQLHelper.SqlInputParam("@ActionName", actionname, System.Data.SqlDbType.VarChar));
                parameters.Add(SQLHelper.SqlInputParam("@RoleAccess", RoleAccess, System.Data.SqlDbType.VarChar));
                parameters.Add(SQLHelper.SqlInputParam("@Role", Role, System.Data.SqlDbType.VarChar));
                var data = objCompanyCredentialsModel.ExecWithStoreProcedure("Proc_RoleAccessFilter  @ControllerName,@ActionName,@RoleAccess,@Role", parameters.ToArray());
                IEnumerable <ActionFilter> checkdata = data.ToList();
                if (checkdata.Count() >= 1)
                {
                    result = "1";
                }
                else
                {
                    result = "0";
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(result);

            throw new NotImplementedException();
        }
Exemplo n.º 12
0
        /// <summary>
        /// View await invoice amount
        /// </summary>
        /// <param name="sortBy"></param>
        /// <param name="pageSize"></param>
        /// <param name="skip"></param>
        /// <param name="AnchorCompanyName"></param>
        /// <param name="TotalInvoiceAmmount"></param>
        /// <param name="ConditionParam"></param>
        /// <param name="CompanyID"></param>
        /// <param name="VendorID"></param>
        /// <returns></returns>
        public IEnumerable <AwaitInvoiceApprovalModel> ViewAwaitInvoiceApproval(string sortBy, int pageSize, Int64 skip, string AnchorCompanyName, string TotalInvoiceAmmount, string ConditionParam, int?CompanyID, Int64?VendorID)
        {
            try
            {
                RepositoryService <AwaitInvoiceApprovalModel> objAwaitInvoiceApprovalModel = new RepositoryService <AwaitInvoiceApprovalModel>(_vContext);
                ICollection <SqlParameter> parameters = new List <SqlParameter>();
                parameters.Add(SQLHelper.SqlInputParam("@sortBy", sortBy, System.Data.SqlDbType.VarChar));
                parameters.Add(SQLHelper.SqlInputParam("@PageSize", pageSize, System.Data.SqlDbType.VarChar));
                parameters.Add(SQLHelper.SqlInputParam("@Skip", skip, System.Data.SqlDbType.VarChar));
                parameters.Add(SQLHelper.SqlInputParam("@AnchorCompanyName", AnchorCompanyName, System.Data.SqlDbType.VarChar));
                parameters.Add(SQLHelper.SqlInputParam("@Invoicetotatalamt", TotalInvoiceAmmount, System.Data.SqlDbType.VarChar));
                parameters.Add(SQLHelper.SqlInputParam("@PONumber", "", System.Data.SqlDbType.VarChar));
                parameters.Add(SQLHelper.SqlInputParam("@InvoiceNo", "", System.Data.SqlDbType.VarChar));
                parameters.Add(SQLHelper.SqlInputParam("@CompanyId", CompanyID, System.Data.SqlDbType.Int));
                parameters.Add(SQLHelper.SqlInputParam("@VendorID", VendorID, System.Data.SqlDbType.Int));
                parameters.Add(SQLHelper.SqlInputParam("@IsDiscountNull", null, System.Data.SqlDbType.SmallInt));//Here 1 and 3 are decision making parametres.It's definition is in sql

                var data = objAwaitInvoiceApprovalModel.ExecWithStoreProcedure("proc_GetViewAwaitInvoiceApproval  @Skip, @PageSize, @sortBy, @AnchorCompanyName, @Invoicetotatalamt,@PONumber,@InvoiceNo,@CompanyId,@VendorID,@IsDiscountNull", parameters.ToArray());
                IEnumerable <AwaitInvoiceApprovalModel> lstInvoice = data.ToList();
                return(lstInvoice);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemplo n.º 13
0
        /// <summary>
        /// Get discount offered invoices list
        /// </summary>
        /// <param name="sortBy"></param>
        /// <param name="pageSize"></param>
        /// <param name="skip"></param>
        /// <param name="AnchorCompanyName"></param>
        /// <param name="InvoiceStatus"></param>
        /// <param name="ConditionParam"></param>
        /// <param name="CompanyID"></param>
        /// <returns></returns>
        public IEnumerable <OfferedDiscountInvModel> GetDiscountOfferedInvoiceList(string sortBy, int pageSize, Int64 skip, string AnchorCompanyName, string InvoiceAmt, string ConditionParam, int?CompanyID, Int32?VendorId)
        {
            try
            {
                RepositoryService <OfferedDiscountInvModel> obj = new RepositoryService <OfferedDiscountInvModel>(_vContext);
                ICollection <SqlParameter> parameters           = new List <SqlParameter>();
                parameters.Add(SQLHelper.SqlInputParam("@sortBy", sortBy, System.Data.SqlDbType.VarChar));
                parameters.Add(SQLHelper.SqlInputParam("@PageSize", pageSize, System.Data.SqlDbType.VarChar));
                parameters.Add(SQLHelper.SqlInputParam("@Skip", skip, System.Data.SqlDbType.VarChar));
                parameters.Add(SQLHelper.SqlInputParam("@AnchorCompanyName", AnchorCompanyName, System.Data.SqlDbType.VarChar));
                parameters.Add(SQLHelper.SqlInputParam("@InvoiceAmt", InvoiceAmt, System.Data.SqlDbType.VarChar));
                parameters.Add(SQLHelper.SqlInputParam("@PONumber", "", System.Data.SqlDbType.VarChar));
                parameters.Add(SQLHelper.SqlInputParam("@InvoiceNo", "", System.Data.SqlDbType.VarChar));
                parameters.Add(SQLHelper.SqlInputParam("@CompanyId", CompanyID, System.Data.SqlDbType.Int));
                parameters.Add(SQLHelper.SqlInputParam("@IsDiscountNull", 2, System.Data.SqlDbType.SmallInt));//Here 2 is a decision making parameter
                parameters.Add(SQLHelper.SqlInputParam("@VendorID", VendorId, System.Data.SqlDbType.BigInt));

                var data = obj.ExecWithStoreProcedure("proc_GetDiscountOfferedInvoiceDet  @Skip, @PageSize, @sortBy, @AnchorCompanyName, @InvoiceAmt,@PONumber,@InvoiceNo,@CompanyId,@IsDiscountNull,@VendorID", parameters.ToArray());
                IEnumerable <OfferedDiscountInvModel> lstInvoice = data.ToList();
                return(lstInvoice);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemplo n.º 14
0
        /// <summary>
        /// Finding name
        /// </summary>
        /// <param name="email"></param>
        /// <returns></returns>
        public string LockedUser(string email)
        {
            RepositoryService <UserLockedResponse> strResponse = new RepositoryService <UserLockedResponse>(_vContext);
            ICollection <SqlParameter>             parameters  = new List <SqlParameter>();

            parameters.Add(SQLHelper.SqlInputParam("@EmailID", email, System.Data.SqlDbType.VarChar));
            var data = strResponse.ExecWithStoreProcedure("proc_UserLoginLocked @EmailID", parameters.ToArray());

            return(data.FirstOrDefault().Message);
        }
Exemplo n.º 15
0
        /// <summary>
        /// Get anchor company list
        /// </summary>
        /// <param name="VendorId"></param>
        /// <returns></returns>
        public IEnumerable <AnchorCompDropDownModel> getAnchorCompList(Int64?VendorId)
        {
            RepositoryService <AnchorCompDropDownModel> objAnchorCompDropDownModel = new RepositoryService <AnchorCompDropDownModel>(_vContext);
            ICollection <SqlParameter> parameters = new List <SqlParameter>();

            parameters.Add(SQLHelper.SqlInputParam("@VendorID", VendorId, System.Data.SqlDbType.Int));
            var data = objAnchorCompDropDownModel.ExecWithStoreProcedure("poc_getAnchorCompDropDown @VendorID", parameters.ToArray());
            IEnumerable <AnchorCompDropDownModel> AnchorCompDetails = data.ToList();

            return(AnchorCompDetails);
        }
Exemplo n.º 16
0
        /// <summary>
        /// Get Employeedatainfor - Procedure without any parameters
        /// </summary>
        /// <returns></returns>
        public Int64 getEmployeesDataInfo()
        {
            Int64 i = 0;
            RepositoryService <EmployeeModel> objEmployeeModel = new RepositoryService <EmployeeModel>(_vContext);

            var data = objEmployeeModel.ExecWithStoreProcedure("proc_getEmployeeData_Demo");
            List <EmployeeModel> employee = data.ToList();


            return(i);
        }
Exemplo n.º 17
0
        /// <summary>
        /// Get vendor documents
        /// </summary>
        /// <param name="VendorID"></param>
        /// <returns></returns>
        public IEnumerable <DocumentModel> GetVendorDocList(int?VendorID)
        {
            RepositoryService <DocumentModel> objDocumentModel = new RepositoryService <DocumentModel>(_vContext);
            ICollection <SqlParameter>        parameters       = new List <SqlParameter>();

            parameters.Add(SQLHelper.SqlInputParam("@VendorID", VendorID, System.Data.SqlDbType.Int));
            var data = objDocumentModel.ExecWithStoreProcedure("Proc_GetVendorDocumentDet  @VendorID", parameters.ToArray());
            IEnumerable <DocumentModel> lstAnchorDocList = data.ToList();

            return(lstAnchorDocList);
        }
Exemplo n.º 18
0
        /// <summary>
        /// Get lookup detail by key
        /// </summary>
        /// <param name="LookupKey"></param>
        /// <returns></returns>
        public IEnumerable <LookupDetails> getLookupDetailByKey(string LookupKey)
        {
            RepositoryService <LookupDetails> objLookupDetails = new RepositoryService <LookupDetails>(_vContext);
            ICollection <SqlParameter>        parameters       = new List <SqlParameter>();

            parameters.Add(SQLHelper.SqlInputParam("@LookupFor", LookupKey, System.Data.SqlDbType.VarChar));

            var data = objLookupDetails.ExecWithStoreProcedure("Proc_getLookupDetailsByGroup @LookupFor", parameters.ToArray());
            IEnumerable <LookupDetails> lookupDetails = data.ToList();

            return(lookupDetails);
        }
Exemplo n.º 19
0
        /// <summary>
        /// Validate login
        /// </summary>
        /// <param name="EmailId"></param>
        /// <param name="Password"></param>
        /// <returns></returns>
        public FinocartMaster ValidateLogin(string EmailId, string Password)
        {
            RepositoryService <FinocartMaster> objFinocartMaster = new RepositoryService <FinocartMaster>(_vContext);
            ICollection <SqlParameter>         parameters        = new List <SqlParameter>();

            parameters.Add(SQLHelper.SqlInputParam("@EmailId", EmailId, System.Data.SqlDbType.VarChar));
            parameters.Add(SQLHelper.SqlInputParam("@Password", Password, System.Data.SqlDbType.VarChar));
            var            data       = objFinocartMaster.ExecWithStoreProcedure("proc_CheckSuperAdminLogin @EmailId, @Password", parameters.ToArray());
            FinocartMaster SuperAdmin = data.SingleOrDefault();

            return(SuperAdmin);
        }
Exemplo n.º 20
0
        /// <summary>
        /// Get record by po number
        /// </summary>
        /// <param name="PONumber"></param>
        /// <returns></returns>
        public IEnumerable <PurchaseOrderModel> GetRecordByPONumber(string PONumber)
        {
            RepositoryService <PurchaseOrderModel> objPurchaseOrderModel = new RepositoryService <PurchaseOrderModel>(_vContext);
            ICollection <SqlParameter>             parameters            = new List <SqlParameter>();

            parameters.Add(SQLHelper.SqlInputParam("@PONumber", PONumber, System.Data.SqlDbType.VarChar));

            var data = objPurchaseOrderModel.ExecWithStoreProcedure("proc_GetPurchaseOrderDetByPONumber  @PONumber", parameters.ToArray());
            IEnumerable <PurchaseOrderModel> lstInvoice = data.ToList();

            return(lstInvoice);
        }
Exemplo n.º 21
0
        /// <summary>
        /// Get employees by Id - Procedure with single parameter
        /// </summary>
        /// <param name="iEmployeeId"></param>
        /// <returns></returns>
        public Employee getEmployeesById(int iEmployeeId)
        {
            RepositoryService <Employee> objEmployee = new RepositoryService <Employee>(_vContext);
            ICollection <SqlParameter>   parameters  = new List <SqlParameter>();

            parameters.Add(SQLHelper.SqlInputParam("@EmployeeID", iEmployeeId, System.Data.SqlDbType.Int));

            var      data     = objEmployee.ExecWithStoreProcedure("proc_getEmployeeData @EmployeeID", parameters.ToArray());
            Employee employee = data.SingleOrDefault();

            return(employee);
        }
Exemplo n.º 22
0
        /// <summary>
        /// validate vendor login
        /// </summary>
        /// <param name="PANNumber"></param>
        /// <param name="Password"></param>
        /// <returns></returns>
        public UserLoginModel validateUser(string EmailID, string Password)
        {
            RepositoryService <UserLoginModel> objUserLoginModel = new RepositoryService <UserLoginModel>(_vContext);
            ICollection <SqlParameter>         parameters        = new List <SqlParameter>();

            parameters.Add(SQLHelper.SqlInputParam("@EmailID", EmailID, System.Data.SqlDbType.VarChar));
            parameters.Add(SQLHelper.SqlInputParam("@Password", Password, System.Data.SqlDbType.VarChar));
            var            data   = objUserLoginModel.ExecWithStoreProcedure("proc_CheckLogin @EmailID, @Password", parameters.ToArray());
            UserLoginModel vendor = data.SingleOrDefault();

            return(vendor);
        }
Exemplo n.º 23
0
        /// <summary>
        /// Get employees infor - Procedure with single parameter which return custommodel
        /// </summary>
        /// <param name="iEmployeeId"></param>
        /// <returns></returns>
        public Int64 getEMployeesInfo(int iEmployeeId)
        {
            Int64 i = 0;
            RepositoryService <EmployeeModel> objEmployeeModel = new RepositoryService <EmployeeModel>(_vContext);
            ICollection <SqlParameter>        parameters       = new List <SqlParameter>();

            parameters.Add(SQLHelper.SqlInputParam("@EmployeeID", iEmployeeId, System.Data.SqlDbType.Int));

            var           data     = objEmployeeModel.ExecWithStoreProcedure("proc_getEmployeeData @EmployeeID", parameters.ToArray());
            EmployeeModel employee = data.SingleOrDefault();

            return(i);
        }
Exemplo n.º 24
0
        /// <summary>
        /// Finding name
        /// </summary>
        /// <param name="InputCredential"></param>
        /// <param name="Password"></param>
        /// <returns></returns>
        public AdminLoginModel FindName(string InputCredential, string Password)
        {
            RepositoryService <AdminLoginModel> objAdminLoginModel = new RepositoryService <AdminLoginModel>(_vContext);
            ICollection <SqlParameter>          parameters         = new List <SqlParameter>();


            parameters.Add(SQLHelper.SqlInputParam("@InputCredential", InputCredential, System.Data.SqlDbType.VarChar));
            parameters.Add(SQLHelper.SqlInputParam("@Password", Password, System.Data.SqlDbType.VarChar));
            var             data = objAdminLoginModel.ExecWithStoreProcedure("proc_CheckAdminLogin @InputCredential, @Password", parameters.ToArray());
            AdminLoginModel user = data.SingleOrDefault();

            return(user);
        }
Exemplo n.º 25
0
        /// <summary>
        /// Getting invoice approved listing
        /// </summary>
        /// <param name="sortBy"></param>
        /// <param name="pageSize"></param>
        /// <param name="skip"></param>
        /// <returns></returns>
        public IEnumerable <InvoiceApprovalOrderModel> GetInvoiceApprovedListing(string sortBy, int pageSize, Int64 skip)
        {
            RepositoryService <InvoiceApprovalOrderModel> objInvoiceApprovalOrderModel = new RepositoryService <InvoiceApprovalOrderModel>(_vContext);
            ICollection <SqlParameter> parameters = new List <SqlParameter>();

            parameters.Add(SQLHelper.SqlInputParam("@SortBy", sortBy, System.Data.SqlDbType.VarChar));
            parameters.Add(SQLHelper.SqlInputParam("@PageSize", pageSize, System.Data.SqlDbType.VarChar));
            parameters.Add(SQLHelper.SqlInputParam("@Skip", skip, System.Data.SqlDbType.VarChar));
            var data = objInvoiceApprovalOrderModel.ExecWithStoreProcedure("proc_GetInvoiceApprovalDet  @Skip, @PageSize, @sortBy", parameters.ToArray());
            IEnumerable <InvoiceApprovalOrderModel> lstInvoiceApproval = data.ToList();

            return(lstInvoiceApproval);
        }
Exemplo n.º 26
0
        /// <summary>
        /// Find user name
        /// </summary>
        /// <param name="EmailId"></param>
        /// <param name="Password"></param>
        /// <returns></returns>
        public User FindUserName(string EmailId, string Password)
        {
            RepositoryService <User>   objUser    = new RepositoryService <User>(_vContext);
            ICollection <SqlParameter> parameters = new List <SqlParameter>();

            //Int64 VendorId = 0;

            parameters.Add(SQLHelper.SqlInputParam("@EmailId", EmailId, System.Data.SqlDbType.VarChar));
            parameters.Add(SQLHelper.SqlInputParam("@Password", Password, System.Data.SqlDbType.VarChar));
            var  data = objUser.ExecWithStoreProcedure("proc_CheckUserLogin @EmailId, @Password", parameters.ToArray());
            User user = data.SingleOrDefault();

            return(user);
        }
Exemplo n.º 27
0
 /// <summary>
 /// Get Holiday Dates
 /// </summary>
 /// <returns></returns>
 public IEnumerable <HolidayDatesModel> GetHolidayDates()
 {
     try
     {
         RepositoryService <HolidayDatesModel> holidayDateList = new RepositoryService <HolidayDatesModel>(_vContext);
         ICollection <SqlParameter>            parameters      = new List <SqlParameter>();
         var data = holidayDateList.ExecWithStoreProcedure("proc_GetHolidaysList", parameters.ToArray());
         IEnumerable <HolidayDatesModel> lstDates = data.ToList();
         return(lstDates);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Exemplo n.º 28
0
 /// <summary>
 /// Get auto funding
 /// </summary>
 /// <param name="AutoFudngId"></param>
 /// <returns></returns>
 public IEnumerable <AutoFunding> GetAutoFundings(Int64?AutoFudngId)
 {
     try
     {
         RepositoryService <AutoFunding> objAutoFunding = new RepositoryService <AutoFunding>(_vContext);
         ICollection <SqlParameter>      parameters     = new List <SqlParameter>();
         parameters.Add(SQLHelper.SqlInputParam("@AutoFudngId", AutoFudngId, System.Data.SqlDbType.Int));
         var data = objAutoFunding.ExecWithStoreProcedure("GetFunding  @AutoFudngId", parameters.ToArray());
         IEnumerable <AutoFunding> lstAnchorCompListing = data.ToList();
         return(lstAnchorCompListing);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Exemplo n.º 29
0
 /// <summary>
 /// Get min payment date
 /// </summary>
 /// <param name="VendorID"></param>
 /// <returns></returns>
 public string GetMinFundPaymentDate(Int64?VendorID)
 {
     try
     {
         RepositoryService <MinPaymentDate> objMinPaymentDate = new RepositoryService <MinPaymentDate>(_vContext);
         ICollection <SqlParameter>         parameters        = new List <SqlParameter>();
         parameters.Add(SQLHelper.SqlInputParam("@vendorId", VendorID, System.Data.SqlDbType.Int));
         var data = objMinPaymentDate.ExecWithStoreProcedure("Proc_GetFinoassistMinPaymentDate @vendorId", parameters.ToArray());
         IEnumerable <MinPaymentDate> maxAmount = data.ToList();
         return(maxAmount.FirstOrDefault().MinFundPaymentDate.ToString());
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Exemplo n.º 30
0
        /// <summary>
        /// Get receivale due individuals
        /// </summary>
        /// <param name="VendorId"></param>
        /// <param name="companyid"></param>
        /// <param name="skip"></param>
        /// <param name="pageSize"></param>
        /// <param name="sortyBy"></param>
        /// <param name="PONumber"></param>
        /// <param name="Page"></param>
        /// <param name="IsTotalCount"></param>
        /// <returns></returns>
        public IEnumerable <ReceivabledueIndividual> GetReceivabledueIndividuals(Int64?VendorId, int?companyid, Int64 skip, int pageSize, string sortyBy, string PONumber, string Page, int IsTotalCount)
        {
            RepositoryService <ReceivabledueIndividual> objReceivabledueIndividual = new RepositoryService <ReceivabledueIndividual>(_vContext);
            ICollection <SqlParameter> parameters = new List <SqlParameter>();

            parameters.Add(SQLHelper.SqlInputParam("@VendorID", VendorId, System.Data.SqlDbType.BigInt));
            parameters.Add(SQLHelper.SqlInputParam("@CompanyId", companyid, System.Data.SqlDbType.Int));
            parameters.Add(SQLHelper.SqlInputParam("@Skip", skip, System.Data.SqlDbType.Int));
            parameters.Add(SQLHelper.SqlInputParam("@PageSize", pageSize, System.Data.SqlDbType.Int));
            parameters.Add(SQLHelper.SqlInputParam("@sortBy", sortyBy, System.Data.SqlDbType.VarChar));
            parameters.Add(SQLHelper.SqlInputParam("@PONumber", PONumber, System.Data.SqlDbType.VarChar));
            var data = objReceivabledueIndividual.ExecWithStoreProcedure("proc_GetDailyReceiveinvoiceDetails @CompanyId,@Skip,@PageSize,@sortBy,@PONumber,@VendorID", parameters.ToArray());
            IEnumerable <ReceivabledueIndividual> list = data.ToList();

            return(list);
        }