Esempio n. 1
0
        /// <summary>
        /// Insert invoice bucket discount
        /// </summary>
        /// <param name="bucketInvoiceModel"></param>
        /// <returns></returns>
        public int InsertFinoInvoiceBucketDiscountDet(BucketInvoiceModel bucketInvoiceModel)
        {
            int      result       = 0;
            string   InvoiceIdStr = bucketInvoiceModel.InvoiceIDStr.TrimEnd(',');
            DateTime PaymentDate  = Convert.ToDateTime(bucketInvoiceModel.ValidToDate.TrimEnd(','));

            try
            {
                IFormatProvider culture = new CultureInfo("en-US", true);


                RepositoryService <BucketInvoiceModel> objBucketInvoiceModel = new RepositoryService <BucketInvoiceModel>(_vContext);
                ICollection <SqlParameter>             parameters            = new List <SqlParameter>();
                parameters.Add(SQLHelper.SqlInputParam("@BucketId", bucketInvoiceModel.BucketID == null ? 0 : bucketInvoiceModel.BucketID, System.Data.SqlDbType.BigInt));
                parameters.Add(SQLHelper.SqlInputParam("@BucketName", bucketInvoiceModel.BucketName, System.Data.SqlDbType.VarChar));
                parameters.Add(SQLHelper.SqlInputParam("@BucketStatus", bucketInvoiceModel.BucketStatus == null ? 4 : bucketInvoiceModel.BucketStatus, System.Data.SqlDbType.Int));
                parameters.Add(SQLHelper.SqlInputParam("@Discount", bucketInvoiceModel.DiscountPercentage, System.Data.SqlDbType.Decimal));
                parameters.Add(SQLHelper.SqlInputParam("@UserId", bucketInvoiceModel.UserId, System.Data.SqlDbType.BigInt));
                parameters.Add(SQLHelper.SqlInputParam("@ValidToDate", PaymentDate, System.Data.SqlDbType.VarChar));
                parameters.Add(SQLHelper.SqlInputParam("@InvoiceIdString", InvoiceIdStr, System.Data.SqlDbType.VarChar));

                result = objBucketInvoiceModel.ExecuteSqlCommand("Proc_InsertFinoInvoiceBucketDet  @BucketId,@BucketName, @BucketStatus, @Discount, @UserId, @ValidToDate,@InvoiceIdString", parameters.ToArray());
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(result);
        }
Esempio n. 2
0
        /// <summary>
        /// Register anchor company
        /// </summary>
        /// <param name="objCompany"></param>
        /// <returns></returns>
        public int UpdateProfile(Company objCompany)
        {
            int result = 0;

            try
            {
                RepositoryService <Company> objComp    = new RepositoryService <Company>(_vContext);
                ICollection <SqlParameter>  parameters = new List <SqlParameter>();
                parameters.Add(SQLHelper.SqlInputParam("@CompanyID", objCompany.CompanyID, System.Data.SqlDbType.BigInt));
                parameters.Add(SQLHelper.SqlInputParam("@Address", objCompany.Address, System.Data.SqlDbType.VarChar));
                parameters.Add(SQLHelper.SqlInputParam("@Contact_Title", objCompany.Contact_Title, System.Data.SqlDbType.VarChar));
                parameters.Add(SQLHelper.SqlInputParam("@Contact_Name", objCompany.Contact_Name, System.Data.SqlDbType.VarChar));
                parameters.Add(SQLHelper.SqlInputParam("@Contact_Designation", objCompany.Contact_Designation, System.Data.SqlDbType.VarChar));
                parameters.Add(SQLHelper.SqlInputParam("@Contact_Mobile", objCompany.Contact_mobile, System.Data.SqlDbType.VarChar));
                parameters.Add(SQLHelper.SqlInputParam("@Contact_Comment", objCompany.Contact_Comments, System.Data.SqlDbType.VarChar));
                parameters.Add(SQLHelper.SqlInputParam("@UpdatedBy", objCompany.UpdatedBy, System.Data.SqlDbType.VarChar));//set UpdatedBy dynamically
                result = objComp.ExecuteSqlCommand("proc_UpdateProfileAdminMaster  @CompanyID,@Address,@Contact_Title,@Contact_Name,@Contact_Designation,@Contact_Mobile,@Contact_Comment,@UpdatedBy", parameters.ToArray());
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(result);
        }
Esempio n. 3
0
        /// <summary>
        /// Insert update user record
        /// </summary>
        /// <param name="objUserPage"></param>
        /// <returns></returns>
        public int InsertUpdateUserRecord(UserModel objUserPage)
        {
            int result = 0;

            try
            {
                RepositoryService <UserModel> objUserModel = new RepositoryService <UserModel>(_vContext);
                ICollection <SqlParameter>    parameters   = new List <SqlParameter>();
                parameters.Add(SQLHelper.SqlInputParam("@UserID", objUserPage.UserID, System.Data.SqlDbType.BigInt));
                parameters.Add(SQLHelper.SqlInputParam("@Name", objUserPage.Name, System.Data.SqlDbType.VarChar));
                parameters.Add(SQLHelper.SqlInputParam("@Email", objUserPage.Email, System.Data.SqlDbType.VarChar));
                parameters.Add(SQLHelper.SqlInputParam("@Mobile", objUserPage.Mobile, System.Data.SqlDbType.VarChar));
                parameters.Add(SQLHelper.SqlInputParam("@Designation", objUserPage.Designation, System.Data.SqlDbType.VarChar));
                parameters.Add(SQLHelper.SqlInputParam("@RolesAccess", objUserPage.RoleAccessID, System.Data.SqlDbType.Int));
                parameters.Add(SQLHelper.SqlInputParam("@AccessViewID", objUserPage.AccessViewID, System.Data.SqlDbType.Int));
                parameters.Add(SQLHelper.SqlInputParam("@CreatedBy", objUserPage.CreatedBy, System.Data.SqlDbType.VarChar)); //set CreatedBy dynamically
                parameters.Add(SQLHelper.SqlInputParam("@UpdatedBy", objUserPage.UpdatedBy, System.Data.SqlDbType.VarChar)); //set UpdatedBy dynamically
                parameters.Add(SQLHelper.SqlInputParam("@Password", objUserPage.Password, System.Data.SqlDbType.VarChar));
                parameters.Add(SQLHelper.SqlInputParam("@CompanyID", objUserPage.CreatedBy, System.Data.SqlDbType.VarChar));
                result = objUserModel.ExecuteSqlCommand("proc_AddUpdateUser  @UserID, @Name, @Email, @Mobile, @Designation, @RolesAccess,@CreatedBy,@UpdatedBy,@AccessViewID,@Password,@CompanyID", parameters.ToArray());
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(result);
        }
Esempio n. 4
0
        public int DeleteHolidateReason(int ID)
        {
            int result = 0;

            try
            {
                RepositoryService <InsertHoli_Reason> objComp    = new RepositoryService <InsertHoli_Reason>(_vContext);
                ICollection <SqlParameter>            parameters = new List <SqlParameter>();
                parameters.Add(SQLHelper.SqlInputParam("@ID", "" + ID + "", System.Data.SqlDbType.Int));
                result = objComp.ExecuteSqlCommand("DeleteHolidate_Reason @ID", parameters.ToArray());
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(result);
        }
Esempio n. 5
0
        /// <summary>
        /// Insert funding rate and date
        /// </summary>
        /// <param name="ObjAutoFunding"></param>
        /// <returns></returns>
        public int InsertFundingRateAndDate(AutoFunding ObjAutoFunding)
        {
            int result = 0;

            try
            {
                RepositoryService <AutoFunding> objAutoFunding = new RepositoryService <AutoFunding>(_vContext);
                ICollection <SqlParameter>      parameters     = new List <SqlParameter>();
                parameters.Add(SQLHelper.SqlInputParam("@Rate", ObjAutoFunding.DiscuntRate, System.Data.SqlDbType.Decimal));
                parameters.Add(SQLHelper.SqlInputParam("@Date", ObjAutoFunding.DiscuntVlidDate, System.Data.SqlDbType.DateTime));
                result = objAutoFunding.ExecuteSqlCommand("proc_AddFundingRate  @Rate,@Date", parameters.ToArray());
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(result);
        }
Esempio n. 6
0
        /// <summary>
        /// delete page by id
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public int DeleteUserPage(int id)
        {
            int result = 0;

            try
            {
                RepositoryService <UserModel> objUserModel = new RepositoryService <UserModel>(_vContext);
                ICollection <SqlParameter>    parameters   = new List <SqlParameter>();

                parameters.Add(SQLHelper.SqlInputParam("@UserID", id, System.Data.SqlDbType.Int));
                result = objUserModel.ExecuteSqlCommand("proc_deleteUser  @UserID", parameters.ToArray());
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(result);
        }
Esempio n. 7
0
        /// <summary>
        /// Update user
        /// </summary>
        /// <param name="UserId"></param>
        /// <returns></returns>
        public int UpdateUser(int?UserId, string role)
        {
            int result = 0;

            try
            {
                RepositoryService <UserModel> objUserModel = new RepositoryService <UserModel>(_vContext);
                ICollection <SqlParameter>    parameters   = new List <SqlParameter>();
                parameters.Add(SQLHelper.SqlInputParam("@UserID", UserId, System.Data.SqlDbType.BigInt));
                parameters.Add(SQLHelper.SqlInputParam("@role", role, System.Data.SqlDbType.VarChar));
                result = objUserModel.ExecuteSqlCommand("proc_MarkAllReadNotifications  @UserID,@role", parameters.ToArray());
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(result);
        }
Esempio n. 8
0
        //public void updateCompanyRate_Days(int? companyID, string percentageRate, int paymentDays)
        //{
        //    throw new NotImplementedException();
        //}

        //public void updateCompanyRate_Days(string percentage, int paymentDays)
        //{
        //    throw new NotImplementedException();
        //}

        public int InsertHolidateReason(int?UserID, DateTime?holidate, string reason)
        {
            int result = 0;

            try
            {
                RepositoryService <InsertHoli_Reason> objComp    = new RepositoryService <InsertHoli_Reason>(_vContext);
                ICollection <SqlParameter>            parameters = new List <SqlParameter>();
                parameters.Add(SQLHelper.SqlInputParam("@UserID", "" + UserID + "", System.Data.SqlDbType.Int));
                parameters.Add(SQLHelper.SqlInputParam("@Holidate", "" + holidate + "", System.Data.SqlDbType.DateTime));
                parameters.Add(SQLHelper.SqlInputParam("@Reason", "" + reason + "", System.Data.SqlDbType.VarChar));
                result = objComp.ExecuteSqlCommand("InsertHolidate_Reason @UserID,@Holidate,@Reason", parameters.ToArray());
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(result);
        }
Esempio n. 9
0
        public int DeleteCompanyById(string companyName, string panNumber)
        {
            int result = 0;

            try
            {
                RepositoryService <Company> objComp    = new RepositoryService <Company>(_vContext);
                ICollection <SqlParameter>  parameters = new List <SqlParameter>();

                parameters.Add(SQLHelper.SqlInputParam("@CompanyName", "" + companyName + "", System.Data.SqlDbType.VarChar));
                parameters.Add(SQLHelper.SqlInputParam("@PanNumber", "" + panNumber + "", System.Data.SqlDbType.VarChar));
                result = objComp.ExecuteSqlCommand("proc_SoftdeleteCompnay @CompanyName,@PanNumber", parameters.ToArray());
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(result);
        }
Esempio n. 10
0
        /// <summary>
        /// Update password
        /// </summary>
        /// <param name="Password"></param>
        /// <param name="EmailID"></param>
        /// <param name="Role"></param>
        /// <returns></returns>
        public int UpdatePassword(string Password, string EmailID, string Role)
        {
            int result = 0;

            try
            {
                RepositoryService <UserModel> objUserModel = new RepositoryService <UserModel>(_vContext);
                ICollection <SqlParameter>    parameters   = new List <SqlParameter>();
                parameters.Add(SQLHelper.SqlInputParam("@Role", Role, System.Data.SqlDbType.VarChar));
                parameters.Add(SQLHelper.SqlInputParam("@Email", EmailID, System.Data.SqlDbType.VarChar));
                parameters.Add(SQLHelper.SqlInputParam("@Password", Password, System.Data.SqlDbType.VarChar));
                result = objUserModel.ExecuteSqlCommand("proc_UpdatePassword  @Role, @Email, @Password", parameters.ToArray());
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(result);
        }
Esempio n. 11
0
        /// <summary>
        /// Update new password
        /// </summary>
        /// <param name="objChangePassword"></param>
        /// <returns></returns>
        public int UpdateNewPassword(ChangePasswordModel objChangePassword)
        {
            int result = 0;

            try
            {
                RepositoryService <UserModel> objUserModel = new RepositoryService <UserModel>(_vContext);
                ICollection <SqlParameter>    parameters   = new List <SqlParameter>();
                parameters.Add(SQLHelper.SqlInputParam("@Role", objChangePassword.Role, System.Data.SqlDbType.VarChar));
                parameters.Add(SQLHelper.SqlInputParam("@UserId", objChangePassword.UserId, System.Data.SqlDbType.Int));
                parameters.Add(SQLHelper.SqlInputParam("@Password", objChangePassword.NewPassword, System.Data.SqlDbType.VarChar));
                result = objUserModel.ExecuteSqlCommand("proc_ChangePassword  @Role,@UserId,@Password", parameters.ToArray());
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(result);
        }
Esempio n. 12
0
        /// <summary>
        /// Insert anchor company document record
        /// </summary>
        /// <param name="AnchorDocument"></param>
        /// <param name="iAnchorCompanyID"></param>
        /// <param name="iDocumentTypeID"></param>
        /// <param name="LocalFolderFileName"></param>
        /// <returns></returns>
        public int AddUserNotificationMessage(int?UserID, string Description, int?RoleID, int?CreatedBy)
        {
            int result = 0;

            try
            {
                RepositoryService <Notification> objNotificationModel = new RepositoryService <Notification>(_vContext);
                ICollection <SqlParameter>       parameters           = new List <SqlParameter>();
                parameters.Add(SQLHelper.SqlInputParam("@UserId", UserID, System.Data.SqlDbType.BigInt)); //set it dynamic
                parameters.Add(SQLHelper.SqlInputParam("@RoleID", RoleID, System.Data.SqlDbType.BigInt)); //set it dynamic
                parameters.Add(SQLHelper.SqlInputParam("@Description", Description, System.Data.SqlDbType.VarChar));
                parameters.Add(SQLHelper.SqlInputParam("@CreatedBy", CreatedBy, System.Data.SqlDbType.VarChar));
                result = objNotificationModel.ExecuteSqlCommand("Proc_InsertNotificationForUser  @UserId,@RoleID,@Description,@CreatedBy", parameters.ToArray());
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(result);
        }
Esempio n. 13
0
        public int AuditTrailLog(string ModuleName, string PageName, Int32?UserID, int CompanyID)
        {
            int result = 0;

            try
            {
                RepositoryService <LogManagement> obj        = new RepositoryService <LogManagement>(_vContext);
                ICollection <SqlParameter>        parameters = new List <SqlParameter>();
                parameters.Add(SQLHelper.SqlInputParam("@ModuleName", ModuleName, System.Data.SqlDbType.VarChar));
                parameters.Add(SQLHelper.SqlInputParam("@PageName", PageName, System.Data.SqlDbType.VarChar));
                parameters.Add(SQLHelper.SqlInputParam("@UserID", UserID, System.Data.SqlDbType.VarChar));
                parameters.Add(SQLHelper.SqlInputParam("@CompanyID", CompanyID, System.Data.SqlDbType.VarChar));
                result = obj.ExecuteSqlCommand("SP_SaveAuditTrailLog @ModuleName,@PageName,@UserID,@CompanyID", parameters.ToArray());
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(result);
        }
Esempio n. 14
0
        /// <summary>
        /// Inser vendor's document details
        /// </summary>
        /// <param name="AnchorDocument"></param>
        /// <param name="iVendorID"></param>
        /// <param name="iDocumentTypeID"></param>
        /// <param name="ToSaveFileName"></param>
        /// <param name="UserId"></param>
        /// <returns></returns>
        public int InsertDocumentDet(IFormFile AnchorDocument, int?iVendorID, int iDocumentTypeID, string ToSaveFileName, Int32?UserId)
        {
            int result = 0;

            try
            {
                RepositoryService <DocumentModel> objDocumentModel = new RepositoryService <DocumentModel>(_vContext);
                ICollection <SqlParameter>        parameters       = new List <SqlParameter>();
                parameters.Add(SQLHelper.SqlInputParam("@VendorID", iVendorID, System.Data.SqlDbType.BigInt));//set it dynamic
                parameters.Add(SQLHelper.SqlInputParam("@FileName", AnchorDocument.FileName, System.Data.SqlDbType.VarChar));
                parameters.Add(SQLHelper.SqlInputParam("@DocumentTypeID", iDocumentTypeID, System.Data.SqlDbType.BigInt));
                parameters.Add(SQLHelper.SqlInputParam("@UploadedBy", UserId, System.Data.SqlDbType.Int));//set it dynamic
                parameters.Add(SQLHelper.SqlInputParam("@LocalFolderFileName", ToSaveFileName, System.Data.SqlDbType.VarChar));
                result = objDocumentModel.ExecuteSqlCommand("Proc_InsertVendorDocDet  @VendorID,@FileName, @DocumentTypeID, @UploadedBy,@LocalFolderFileName", parameters.ToArray());
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(result);
        }
Esempio n. 15
0
        /// <summary>
        /// Register anchor company
        /// </summary>
        /// <param name="objCompany"></param>
        /// <returns></returns>
        public int UpdateSendGrid(EditSendGridDetailsModel objSendGridModel)
        {
            int result = 0;

            try
            {
                RepositoryService <EditSendGridDetailsModel> objComp = new RepositoryService <EditSendGridDetailsModel>(_vContext);
                ICollection <SqlParameter> parameters = new List <SqlParameter>();
                parameters.Add(SQLHelper.SqlInputParam("@UserId", objSendGridModel.UserId, System.Data.SqlDbType.VarChar));
                parameters.Add(SQLHelper.SqlInputParam("@Password", objSendGridModel.Password, System.Data.SqlDbType.VarChar));
                parameters.Add(SQLHelper.SqlInputParam("@HostName", objSendGridModel.HostName, System.Data.SqlDbType.VarChar));
                parameters.Add(SQLHelper.SqlInputParam("@PortNO", objSendGridModel.PortNO, System.Data.SqlDbType.VarChar));
                result = objComp.ExecuteSqlCommand("proc_AddUpdateSendGrid  @UserId,@Password, @HostName, @PortNO", parameters.ToArray());
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(result);
        }
Esempio n. 16
0
        /// <summary>
        /// Register anchor company
        /// </summary>
        /// <param name="objCompany"></param>
        /// <returns></returns>
        public int UpdateUserProfile(UserModel objUserPage)
        {
            int result = 0;

            try
            {
                RepositoryService <UserModel> objComp    = new RepositoryService <UserModel>(_vContext);
                ICollection <SqlParameter>    parameters = new List <SqlParameter>();
                parameters.Add(SQLHelper.SqlInputParam("@CompanyID", objUserPage.CompanyID, System.Data.SqlDbType.BigInt));
                parameters.Add(SQLHelper.SqlInputParam("@Name", objUserPage.Name, System.Data.SqlDbType.VarChar));
                parameters.Add(SQLHelper.SqlInputParam("@Designation", objUserPage.Designation, System.Data.SqlDbType.VarChar));
                parameters.Add(SQLHelper.SqlInputParam("@Mobile", objUserPage.Mobile, System.Data.SqlDbType.VarChar));
                result = objComp.ExecuteSqlCommand("proc_UpdateProfileUserMaster  @CompanyID,@Name,@Designation,@Mobile", parameters.ToArray());
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(result);
        }
Esempio n. 17
0
        /// <summary>
        /// Update funding
        /// </summary>
        /// <param name="id"></param>
        /// <param name="rate"></param>
        /// <param name="date"></param>
        /// <returns></returns>
        public int Updatefunding(string id, string rate, string date)
        {
            int result = 0;

            try
            {
                string AutoFudngId     = id;
                string DiscuntRate     = rate;
                string DiscuntVlidDate = date;
                RepositoryService <AutoFunding> objAutoFunding = new RepositoryService <AutoFunding>(_vContext);
                ICollection <SqlParameter>      parameters     = new List <SqlParameter>();
                parameters.Add(SQLHelper.SqlInputParam("@AutoFudngId", AutoFudngId, System.Data.SqlDbType.Int));
                parameters.Add(SQLHelper.SqlInputParam("@DiscuntRate", DiscuntRate, System.Data.SqlDbType.Decimal));
                parameters.Add(SQLHelper.SqlInputParam("@DiscuntVlidDate", DiscuntVlidDate, System.Data.SqlDbType.DateTime));
                result = objAutoFunding.ExecuteSqlCommand("UPDATEFUNDING  @AutoFudngId,@DiscuntRate,@DiscuntVlidDate", parameters.ToArray());
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(result);
        }
Esempio n. 18
0
        public int LogManagement(string ControllerName, string ActionName, string ErrorMessage, int ErrorLine, Int32?UserID)
        {
            int result = 0;

            try
            {
                RepositoryService <LogManagement> obj        = new RepositoryService <LogManagement>(_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("@Message", ErrorMessage, System.Data.SqlDbType.VarChar));
                parameters.Add(SQLHelper.SqlInputParam("@ErrorLine", ErrorLine, System.Data.SqlDbType.VarChar));
                parameters.Add(SQLHelper.SqlInputParam("@UserID", UserID, System.Data.SqlDbType.VarChar));
                result = obj.ExecuteSqlCommand("SP_SaveLogManagement @ControllerName,@ActionName,@Message,@ErrorLine,@UserID", parameters.ToArray());
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(result);
        }
Esempio n. 19
0
        /// <summary>
        /// save and update invoice approval record
        /// </summary>
        /// <param name="objUserPage"></param>
        /// <returns></returns>
        public int InsertUpdateApprovalRecord(InvoiceApprovalOrderModel objUserPage)
        {
            int result = 0;

            try
            {
                RepositoryService <InvoiceApprovalOrderModel> objInvoiceApprovalOrderModel = new RepositoryService <InvoiceApprovalOrderModel>(_vContext);
                ICollection <SqlParameter> parameters = new List <SqlParameter>();
                parameters.Add(SQLHelper.SqlInputParam("@ApprovalID", objUserPage.ApprovalID, System.Data.SqlDbType.Int));
                parameters.Add(SQLHelper.SqlInputParam("@FromAmount", objUserPage.FromAmount, System.Data.SqlDbType.Decimal));
                parameters.Add(SQLHelper.SqlInputParam("@ToAmount", objUserPage.ToAmount, System.Data.SqlDbType.Decimal));
                parameters.Add(SQLHelper.SqlInputParam("@ApprovedBy", objUserPage.ApprovedBy, System.Data.SqlDbType.Int));
                parameters.Add(SQLHelper.SqlInputParam("@Users", objUserPage.Users, System.Data.SqlDbType.VarChar));
                result = objInvoiceApprovalOrderModel.ExecuteSqlCommand("proc_AddUpdateInvoiceApproved  @ApprovalID,@FromAmount, @ToAmount, @ApprovedBy, @Users", parameters.ToArray());
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(result);
        }
Esempio n. 20
0
        public int SendNotification(BucketInvoiceModel bucketInvoiceModel, Int32?UserId, Int32?VendorId)
        {
            int    result       = 0;
            string InvoiceIdStr = bucketInvoiceModel.InvoiceIDStr.TrimEnd(',');

            try
            {
                RepositoryService <BucketInvoiceModel> objBucketInvoiceModel = new RepositoryService <BucketInvoiceModel>(_vContext);
                ICollection <SqlParameter>             parameters            = new List <SqlParameter>();
                parameters.Add(SQLHelper.SqlInputParam("@RoleID", 1, System.Data.SqlDbType.BigInt));
                parameters.Add(SQLHelper.SqlInputParam("@UserID", UserId, System.Data.SqlDbType.BigInt));
                parameters.Add(SQLHelper.SqlInputParam("@VendorID", VendorId, System.Data.SqlDbType.BigInt));
                parameters.Add(SQLHelper.SqlInputParam("@InvoiceIdString", InvoiceIdStr, System.Data.SqlDbType.VarChar));
                parameters.Add(SQLHelper.SqlInputParam("@Discount", bucketInvoiceModel.DiscountPercentage, System.Data.SqlDbType.Decimal));

                result = objBucketInvoiceModel.ExecuteSqlCommand("Proc_InsertAnchorNotify  @RoleID,@UserID,@VendorID,@InvoiceIdString,@Discount", parameters.ToArray());
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(result);
        }
Esempio n. 21
0
        /// <summary>
        /// Register anchor company
        /// </summary>
        /// <param name="objCompany"></param>
        /// <returns></returns>
        public int InsertAnchorCompanyRegister(Company objCompany)
        {
            int result = 0;

            try
            {
                RepositoryService <Company> objComp    = new RepositoryService <Company>(_vContext);
                ICollection <SqlParameter>  parameters = new List <SqlParameter>();
                parameters.Add(SQLHelper.SqlInputParam("@CompanyID", objCompany.CompanyID, System.Data.SqlDbType.BigInt));
                parameters.Add(SQLHelper.SqlInputParam("@Company_Name", objCompany.Company_name, System.Data.SqlDbType.VarChar));
                parameters.Add(SQLHelper.SqlInputParam("@Login_Id", objCompany.Login_id, System.Data.SqlDbType.VarChar));
                parameters.Add(SQLHelper.SqlInputParam("@Password", SecurityHelperService.Encrypt(objCompany.Password), System.Data.SqlDbType.VarChar));
                parameters.Add(SQLHelper.SqlInputParam("@Address", objCompany.Address, System.Data.SqlDbType.VarChar));
                parameters.Add(SQLHelper.SqlInputParam("@InterestedAS", objCompany.InterestedAs, System.Data.SqlDbType.VarChar));
                parameters.Add(SQLHelper.SqlInputParam("@CompanyType", objCompany.CompanyType, System.Data.SqlDbType.VarChar));
                parameters.Add(SQLHelper.SqlInputParam("@Pan_Number", objCompany.Pan_number, System.Data.SqlDbType.VarChar));
                parameters.Add(SQLHelper.SqlInputParam("@Contact_Title", objCompany.Contact_Title, System.Data.SqlDbType.VarChar));
                parameters.Add(SQLHelper.SqlInputParam("@Contact_Name", objCompany.Contact_Name, System.Data.SqlDbType.VarChar));
                parameters.Add(SQLHelper.SqlInputParam("@Contact_Designation", objCompany.Contact_Designation, System.Data.SqlDbType.VarChar));
                parameters.Add(SQLHelper.SqlInputParam("@Contact_Email", objCompany.Contact_email, System.Data.SqlDbType.VarChar));
                parameters.Add(SQLHelper.SqlInputParam("@Contact_Mobile", objCompany.Contact_mobile, System.Data.SqlDbType.VarChar));
                parameters.Add(SQLHelper.SqlInputParam("@Contact_Comment", objCompany.Contact_Comments, System.Data.SqlDbType.VarChar));
                parameters.Add(SQLHelper.SqlInputParam("@Contact_CIN", objCompany.Contact_CIN, System.Data.SqlDbType.VarChar));
                parameters.Add(SQLHelper.SqlInputParam("@CreatedBy", objCompany.CreatedBy, System.Data.SqlDbType.VarChar)); //set CreatedBy dynamically
                parameters.Add(SQLHelper.SqlInputParam("@UpdatedBy", objCompany.UpdatedBy, System.Data.SqlDbType.VarChar)); //set UpdatedBy dynamically
                parameters.Add(SQLHelper.SqlInputParam("@FactoryOrReverseFactory", objCompany.FactoryOrReverseFactory, System.Data.SqlDbType.BigInt));
                parameters.Add(SQLHelper.SqlInputParam("@Status", objCompany.status, System.Data.SqlDbType.Int));
                result = objComp.ExecuteSqlCommand("proc_AddUpdateCompany  @CompanyID,@Company_Name, @Login_Id, @Password,@Address, @InterestedAS,@CompanyType,@Pan_Number,@Contact_CIN,@Contact_Title,@Contact_Name,@Contact_Designation,@Contact_Email,@Contact_Mobile,@Contact_Comment,@CreatedBy,@UpdatedBy,@FactoryOrReverseFactory,@Status", parameters.ToArray());
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(result);
        }