示例#1
0
    public int InsertGuardian(GuadianEntity oGuardianEntity)
    {
        con = oConnectionDatabase.DatabaseConnection();
        int i = 0;

        cmd = new SqlCommand("INSERT INTO tblGuardian (GuardianID,GuardianRightPercentage,GuardianName,GuardianFatherName,GuardianRelationWithN,"
                             + "GuardianSex,GuardianDOB,GuardianReligion,GuardianCountryID,GuardianNID,GuardianTIN,GuardianPermanentAddress,GuardianPermanentContact,GuardianPresentAddress,"
                             + "GuardianPresentContact,NomineeID,GuardianCreateBy,GuardianLastModified)"
                             + "VALUES('" + oGuardianEntity.GuardianID + "','" + oGuardianEntity.GuardianRightPercentage + "','" + oGuardianEntity.GuardianName + "',"
                             + "'" + oGuardianEntity.GuardianFatherName + "','" + oGuardianEntity.GuardianRelationWithN + "','" + oGuardianEntity.GuardianSex + "','" + oGuardianEntity.GuardianDOB + "',"
                             + "'" + oGuardianEntity.GuardianReligion + "','" + oGuardianEntity.GuardianCountryID + "','" + oGuardianEntity.GuardianNID + "','" + oGuardianEntity.GuardianTIN + "','" + oGuardianEntity.GuardianPermanentAddress + "',"
                             + "'" + oGuardianEntity.GuardianPermanentContact + "','" + oGuardianEntity.GuardianPresentAddress + "','" + oGuardianEntity.GuardianPresentContact + "',"
                             + "'" + oGuardianEntity.NomineeID + "','" + oGuardianEntity.GuardianCreateBy + "','" + oGuardianEntity.GuardianLastModified + "')", con);



        try
        {
            cmd.CommandType = CommandType.Text;
            cmd.ExecuteNonQuery();
            i = 1;
        }
        catch { }
        con.Close();
        return(i);
    }
示例#2
0
    public int InsertUserInfo(UserInfoEntity oUserInfoEntity)
    {
        con = oConnectionDatabase.DatabaseConnection();

        try { con.Open(); }
        catch { }
        int i = 0;

        //cmd = new SqlCommand("INSERT INTO tblCustomerImage (CustomerID,CustomerImage,CustomerSignature,Creatby,LastModifiedBy) VALUES('" + customerId + "','" + image + "','" + signature + "','" + Creatby + "','" + LastModifiedBy + "')", con);
        cmd = new SqlCommand("INSERT INTO tblUserInfo (UserID,UserType,Password,ConfirmPassword,Active,EmployeeID,CreateBy,LastModifiedBy) VALUES(@UserID,@UserType,@Password,@ConfirmPassword,@Active,@EmployeeID,@CreateBy,@LastModifiedBy)", con);
        cmd.Parameters.AddWithValue("@UserID", SqlDbType.VarChar).Value         = oUserInfoEntity.UserID;
        cmd.Parameters.AddWithValue("@UserType", SqlDbType.Image).Value         = oUserInfoEntity.UserType;
        cmd.Parameters.AddWithValue("@Password", SqlDbType.VarChar).Value       = oUserInfoEntity.Password;
        cmd.Parameters.AddWithValue("@ConfirmPassword", SqlDbType.Image).Value  = oUserInfoEntity.ConfirmPassword;
        cmd.Parameters.AddWithValue("@Active", SqlDbType.VarChar).Value         = oUserInfoEntity.Active;
        cmd.Parameters.AddWithValue("@EmployeeID", SqlDbType.VarChar).Value     = oUserInfoEntity.EmployeeID;
        cmd.Parameters.AddWithValue("@CreateBy", SqlDbType.Image).Value         = oUserInfoEntity.CreateBy;
        cmd.Parameters.AddWithValue("@LastModifiedBy", SqlDbType.VarChar).Value = oUserInfoEntity.LastModifiedBy;


        try
        {
            cmd.CommandType = CommandType.Text;
            cmd.ExecuteNonQuery();
            i = 1;
        }
        catch { }
        con.Close();
        return(i);
    }
示例#3
0
    public int InsertUserAssignRight(UserAssignRightEntity oUserAssignRightEntity)
    {
        con = oConnectionDatabase.DatabaseConnection();

        try { con.Open(); }
        catch { }
        int i = 0;

        //cmd = new SqlCommand("INSERT INTO tblCustomerImage (CustomerID,CustomerImage,CustomerSignature,Creatby,LastModifiedBy) VALUES('" + customerId + "','" + image + "','" + signature + "','" + Creatby + "','" + LastModifiedBy + "')", con);
        cmd = new SqlCommand("INSERT INTO tblUserAssignRights (UserID,MenuNo,MenuRights,SubMenuNo,SubMenuRights,CreateBy,LastModifiedBy) VALUES(@UserID,@MenuNo,@MenuRights,@SubMenuNo,@SubMenuRights,@CreateBy,@LastModifiedBy)", con);
        cmd.Parameters.AddWithValue("@UserID", SqlDbType.VarChar).Value         = oUserAssignRightEntity.UserID;
        cmd.Parameters.AddWithValue("@MenuNo", SqlDbType.Image).Value           = oUserAssignRightEntity.MenuNo;
        cmd.Parameters.AddWithValue("@SubMenuNo", SqlDbType.VarChar).Value      = oUserAssignRightEntity.SubMenuNo;
        cmd.Parameters.AddWithValue("@MenuRights", SqlDbType.Image).Value       = oUserAssignRightEntity.MenuRights;
        cmd.Parameters.AddWithValue("@SubMenuRights", SqlDbType.VarChar).Value  = oUserAssignRightEntity.SubMenuRights;
        cmd.Parameters.AddWithValue("@CreateBy", SqlDbType.Image).Value         = oUserAssignRightEntity.CreateBy;
        cmd.Parameters.AddWithValue("@LastModifiedBy", SqlDbType.VarChar).Value = oUserAssignRightEntity.LastModifiedBy;


        try
        {
            cmd.CommandType = CommandType.Text;
            cmd.ExecuteNonQuery();
            i = 1;
        }
        catch { }
        con.Close();
        return(i);
    }
示例#4
0
    public int InsertMenu(MenuEntity oMenuEntity)
    {
        con = oConnectionDatabase.DatabaseConnection();

        ////try { con.Open(); }
        ////catch { }
        int i = 0;

        //cmd = new SqlCommand("INSERT INTO tblCustomerImage (CustomerID,CustomerImage,CustomerSignature,Creatby,LastModifiedBy) VALUES('" + customerId + "','" + image + "','" + signature + "','" + Creatby + "','" + LastModifiedBy + "')", con);
        cmd = new SqlCommand("INSERT INTO tblMenuItem (MenuNo,MenuName,CreateBy,LastModifiedBy) VALUES(@MenuNo,@MenuName,@CreateBy,@LastModifiedBy)", con);
        cmd.Parameters.AddWithValue("@MenuNo", SqlDbType.VarChar).Value       = oMenuEntity.MenuNo;
        cmd.Parameters.AddWithValue("@MenuName", SqlDbType.Image).Value       = oMenuEntity.MenuName;
        cmd.Parameters.AddWithValue("@CreateBy", SqlDbType.VarChar).Value     = oMenuEntity.CreateBy;
        cmd.Parameters.AddWithValue("@LastModifiedBy", SqlDbType.Image).Value = oMenuEntity.LastModifiedBy;

        try
        {
            cmd.CommandType = CommandType.Text;
            cmd.ExecuteNonQuery();
            i = 1;
        }
        catch { }
        con.Close();
        return(i);
    }
    //Load BankName
    private void LoadBankName()
    {
        SqlConnection con;
        SqlCommand    cmd;
        string        sqlQuery = null;

        oTransactionDAL = new TransactionDAL();
        DataTable dt = new DataTable();

        Condition = "";
        if (getValue == "Branch Admin" && division == "Branch Admin")
        {
            sqlQuery        = "SELECT TOP 1 0 BANK_ID, 'All Item' BANK_NAME FROM ISS_BANK_INFO ORDER BY BANK_NAME";
            con             = oConnectionDatabase.DatabaseConnection();
            cmd             = new SqlCommand(sqlQuery, con);
            cmd.CommandType = CommandType.Text;
            SqlDataAdapter da = new SqlDataAdapter(cmd);

            try
            {
                da.Fill(dt);
            }
            catch { }
            con.Close();
        }
        else
        {
            dt = oTransactionDAL.Bank_Name(Condition);
        }
        drpBankName.DataSource     = dt;
        drpBankName.DataTextField  = "BANK_NAME";
        drpBankName.DataValueField = "BANK_ID";
        drpBankName.DataBind();
    }
示例#6
0
    public int InsertEmployeeInfo(EmployeeInfoEntity oEmployeeInfoEntity)
    {
        con = oConnectionDatabase.DatabaseConnection();
        int i = 0;

        cmd = new SqlCommand("INSERT INTO tblEmployeeInfo (EmployeeID,EmployeeName,Designation,RegistrationNo,BranchCode,MobileNo,CreateBy,LastModifiedBy) VALUES('" + oEmployeeInfoEntity.EmployeeID + "','" + oEmployeeInfoEntity.EmployeeName + "','" + oEmployeeInfoEntity.Designation + "','" + oEmployeeInfoEntity.RegistrationNo + "','" + oEmployeeInfoEntity.BranchCode + "','" + oEmployeeInfoEntity.MobileNo + "','" + oEmployeeInfoEntity.CreateBy + "','" + oEmployeeInfoEntity.LastModifiedBy + "')", con);
        try
        {
            cmd.CommandType = CommandType.Text;
            cmd.ExecuteNonQuery();
            i = 1;
        }
        catch { }
        con.Close();
        return(i);
    }
示例#7
0
    public int InsertClientType(ClientTypeEntity oClientTypeEntity)
    {
        con = oConnectionDatabase.DatabaseConnection();
        int i = 0;

        cmd = new SqlCommand("INSERT INTO tblClientType (ClientTypeCode,ClientTypeDetais,ClientTypeRemarks,ClientTypeChargePercentage,ClientTypeCreateBy,ClientTypeLastModifiedBy) VALUES('" + oClientTypeEntity.ClientTypeCode + "','" + oClientTypeEntity.ClientTypeDetais + "','" + oClientTypeEntity.ClientTypeRemarks + "','" + oClientTypeEntity.ClientTypeChargePercentage + "','" + oClientTypeEntity.ClientTypeCreateBy + "','" + oClientTypeEntity.ClientTypeLastModifiedBy + "')", con);
        try
        {
            cmd.CommandType = CommandType.Text;
            cmd.ExecuteNonQuery();
            i = 1;
        }
        catch { }
        con.Close();
        return(i);
    }
示例#8
0
    public int InsertTransactionRole(TransactionRoleEntity oTransactionRoleEntity)
    {
        con = oConnectionDatabase.DatabaseConnection();
        int i = 0;

        cmd = new SqlCommand("INSERT INTO tblRole (RoleCode,RoleDetails,RoleRemarks,RoleCreateBy,RoleLastModifiedBy) VALUES('" + oTransactionRoleEntity.RoleCode + "','" + oTransactionRoleEntity.RoleDetails + "','" + oTransactionRoleEntity.RoleRemarks + "','" + oTransactionRoleEntity.RoleCreateBy + "','" + oTransactionRoleEntity.RoleLastModifiedBy + "')", con);
        try
        {
            cmd.CommandType = CommandType.Text;
            cmd.ExecuteNonQuery();
            i = 1;
        }
        catch { }
        con.Close();
        return(i);
    }
示例#9
0
    public int InsertAccountGroupReport(AccountGroupReportEntity oAccountGroupReportEntity)
    {
        con = oConnectionDatabase.DatabaseConnection();
        int i = 0;

        cmd = new SqlCommand("INSERT INTO tblAccountGroupReport (AccGrpCodeR,AccGrpNameR) VALUES('" + oAccountGroupReportEntity.AccGrpCodeR + "','" + oAccountGroupReportEntity.AccGrpNameR + "')", con);
        try
        {
            cmd.CommandType = CommandType.Text;
            cmd.ExecuteNonQuery();
            i = 1;
        }
        catch { }
        con.Close();
        return(i);
    }
示例#10
0
    public int InsertCustomer(CustomerEntity oCustomerEntity)
    {
        con = oConnectionDatabase.DatabaseConnection();
        int i = 0;

        cmd = new SqlCommand("INSERT INTO tblCustomer (CustomerID,CustomerName,CustomerFatherName,CustomerMotherName,CustomerSex,"
                             + "CustomerDOB,CustomerReligion,CountryID,CustomerNID,CustomerTIN,CustomerPassportNO,CustomerMeritalStatus,CustomerEmail,CustomerPermanentAddress,"
                             + "CustomerPermanentContact,CustomerPresentAddress,CustomerPresentContact,CustomerMailingAddress,CustomerMailingContact,CustomerNo,Bankid,BranchID,CustomerBankAccount,"
                             + "CustommerCreateBY,CustomerApprovedby,CustomerLastModified,CustomerCleintID,CustomerIsCompany,CustomerMobileNo)"
                             + "VALUES('" + oCustomerEntity.CustomerID + "','" + oCustomerEntity.CustomerName + "','" + oCustomerEntity.CustomerFatherName + "',"
                             + "'" + oCustomerEntity.CustomerMotherName + "','" + oCustomerEntity.CustomerSex + "','" + oCustomerEntity.CustomerDOB + "','" + oCustomerEntity.CustomerReligion + "',"
                             + "'" + oCustomerEntity.CountryID + "','" + oCustomerEntity.CustomerNID + "','" + oCustomerEntity.CustomerTIN + "','" + oCustomerEntity.CustomerPassportNO + "','" + oCustomerEntity.CustomerMeritalStatus + "',"
                             + "'" + oCustomerEntity.CustomerEmail + "','" + oCustomerEntity.CustomerPermanentAddress + "','" + oCustomerEntity.CustomerPermanentContact + "',"
                             + "'" + oCustomerEntity.CustomerPresentAddress + "','" + oCustomerEntity.CustomerPresentContact + "','" + oCustomerEntity.CustomerMailingAddress + "','" + oCustomerEntity.CustomerMailingContact + "',"
                             + "'" + oCustomerEntity.CustomerNo + "','" + oCustomerEntity.Bankid + "','" + oCustomerEntity.BranchID + "','" + oCustomerEntity.CustomerBankAccount + "',"
                             + "'" + oCustomerEntity.CustommerCreateBY + "','" + oCustomerEntity.CustomerApprovedby + "','" + oCustomerEntity.CustomerLastModified + "','" + oCustomerEntity.CustomerCleintID + "',"
                             + "'" + oCustomerEntity.CustomerIsCompany + "','" + oCustomerEntity.CustomerMobileNo + "')", con);
        try
        {
            cmd.CommandType = CommandType.Text;
            cmd.ExecuteNonQuery();
            i = 1;
        }
        catch { }
        con.Close();
        return(i);
    }
示例#11
0
    public int InsertNominee(NomineeEntity oNomineeEntity)
    {
        con = oConnectionDatabase.DatabaseConnection();
        int i = 0;

        cmd = new SqlCommand("INSERT INTO tblNominee (NomineeID,NomineeRightPercentage,NomineeName,NomineeFatherName,NomineeRelationWithC,"
                             + "NomineeSex,NomineeDOB,NomineeReligion,NomineeCountryID,NomineeNID,NomineeTIN,NomineePermanentAddress,NomineePermanentContact,NomineePresentAddress,"
                             + "NomineePresentContact,ClientID,NomineeIsMature,NomineeCreateBy,NomineeLastModified)"
                             + "VALUES('" + oNomineeEntity.NomineeID + "','" + oNomineeEntity.NomineeRightPercentage + "','" + oNomineeEntity.NomineeName + "',"
                             + "'" + oNomineeEntity.NomineeFatherName + "','" + oNomineeEntity.NomineeRelationWithC + "','" + oNomineeEntity.NomineeSex + "','" + oNomineeEntity.NomineeDOB + "',"
                             + "'" + oNomineeEntity.NomineeReligion + "','" + oNomineeEntity.NomineeCountryID + "','" + oNomineeEntity.NomineeNID + "','" + oNomineeEntity.NomineeTIN + "','" + oNomineeEntity.NomineePermanentAddress + "',"
                             + "'" + oNomineeEntity.NomineePermanentContact + "','" + oNomineeEntity.NomineePresentAddress + "','" + oNomineeEntity.NomineePresentContact + "',"
                             + "'" + oNomineeEntity.ClientID + "','" + oNomineeEntity.NomineeIsMature + "','" + oNomineeEntity.NomineeCreateBy + "','" + oNomineeEntity.NomineeLastModified + "')", con);



        try
        {
            cmd.CommandType = CommandType.Text;
            cmd.ExecuteNonQuery();
            i = 1;
        }
        catch { }
        con.Close();
        return(i);
    }
示例#12
0
    public int InsertChartOfAccount(ChartOfAccountEntity oChartOfAccountEntity)
    {
        con = oConnectionDatabase.DatabaseConnection();

        try { con.Open(); }
        catch { }
        int i = 0;

        //cmd = new SqlCommand("INSERT INTO tblCustomerImage (CustomerID,CustomerImage,CustomerSignature,Creatby,LastModifiedBy) VALUES('" + customerId + "','" + image + "','" + signature + "','" + Creatby + "','" + LastModifiedBy + "')", con);
        cmd = new SqlCommand("INSERT INTO tblChartOfAccount (CoAccNo,CoAccName,OpenDate,GrpAccSL,AccGrpSLR,AccTypeSL,SGrpAccSL,Posted,OpenDayBalance,ClossingBalance,AvailableBalance,CurrentBalance,CreateBy,LastModifiedBy) VALUES(@CoAccNo,@CoAccName,@OpenDate,@GrpAccSL,@AccGrpSLR,@AccTypeSL,@SGrpAccSL,@Posted,@OpenDayBalance,@ClossingBalance,@AvailableBalance,@CurrentBalance,@CreateBy,@LastModifiedBy)", con);
        cmd.Parameters.AddWithValue("@CoAccNo", SqlDbType.VarChar).Value          = oChartOfAccountEntity.CoAccNo;
        cmd.Parameters.AddWithValue("@CoAccName", SqlDbType.VarChar).Value        = oChartOfAccountEntity.CoAccName;
        cmd.Parameters.AddWithValue("@OpenDate", SqlDbType.VarChar).Value         = oChartOfAccountEntity.OpenDate;
        cmd.Parameters.AddWithValue("@GrpAccSL", SqlDbType.VarChar).Value         = oChartOfAccountEntity.GrpAccSL;
        cmd.Parameters.AddWithValue("@AccGrpSLR", SqlDbType.VarChar).Value        = oChartOfAccountEntity.AccGrpSLR;
        cmd.Parameters.AddWithValue("@AccTypeSL", SqlDbType.VarChar).Value        = oChartOfAccountEntity.AccTypeSL;
        cmd.Parameters.AddWithValue("@SGrpAccSL", SqlDbType.VarChar).Value        = oChartOfAccountEntity.SGrpAccSL;
        cmd.Parameters.AddWithValue("@Posted", SqlDbType.VarChar).Value           = oChartOfAccountEntity.Posted;
        cmd.Parameters.AddWithValue("@OpenDayBalance", SqlDbType.VarChar).Value   = oChartOfAccountEntity.OpenDayBalance;
        cmd.Parameters.AddWithValue("@ClossingBalance", SqlDbType.VarChar).Value  = oChartOfAccountEntity.ClossingBalance;
        cmd.Parameters.AddWithValue("@AvailableBalance", SqlDbType.VarChar).Value = oChartOfAccountEntity.AvailableBalance;
        cmd.Parameters.AddWithValue("@CurrentBalance", SqlDbType.VarChar).Value   = oChartOfAccountEntity.CurrentBalance;
        cmd.Parameters.AddWithValue("@CreateBy", SqlDbType.VarChar).Value         = oChartOfAccountEntity.CreateBy;
        cmd.Parameters.AddWithValue("@LastModifiedBy", SqlDbType.VarChar).Value   = oChartOfAccountEntity.LastModifiedBy;
        try
        {
            cmd.CommandType = CommandType.Text;
            cmd.ExecuteNonQuery();
            i = 1;
        }
        catch { }
        con.Close();
        return(i);
    }
示例#13
0
    public int InsertBank(BankInformationEntity oBankInformationEntity)
    {
        con = oConnectionDatabase.DatabaseConnection();
        int i = 0;

        cmd = new SqlCommand("INSERT INTO tblBank (BankName,BankRemarks) VALUES('" + oBankInformationEntity.BankName + "','" + oBankInformationEntity.BankRemarks + "')", con);
        try
        {
            cmd.CommandType = CommandType.Text;
            cmd.ExecuteNonQuery();
            i = 1;
        }
        catch { }
        con.Close();
        return(i);
    }
示例#14
0
    public int InsertTransaction(TransactionEntity oTransactionEntity, List <TransactionAccEntity> oTransactionAccEntityList)
    {
        con = oConnectionDatabase.DatabaseConnection();
        int            i = 0;
        SqlTransaction oSqlTransaction;

        oSqlTransaction = con.BeginTransaction("s");

        cmd             = new SqlCommand("INSERT INTO tblTransaction (VoucherNo,VoucherDate,BrSL,TranTypeSL,PartiCulars,Posted,Approved,BillSL,RevTranSL,CreateBy,LastModifiedBy) VALUES(@VoucherNo,@VoucherDate,@BrSL,@TranTypeSL,@PartiCulars,@Posted,@Approved,@BillSL,@RevTranSL,@CreateBy,@LastModifiedBy)", con);
        cmd.Transaction = oSqlTransaction;
        cmd.Parameters.AddWithValue("@VoucherNo", SqlDbType.VarChar).Value      = oTransactionEntity.VoucherNo;
        cmd.Parameters.AddWithValue("@VoucherDate", SqlDbType.DateTime).Value   = oTransactionEntity.VoucherDate;
        cmd.Parameters.AddWithValue("@BrSL", SqlDbType.VarChar).Value           = oTransactionEntity.BrSL;
        cmd.Parameters.AddWithValue("@TranTypeSL", SqlDbType.VarChar).Value     = oTransactionEntity.TranTypeSL;
        cmd.Parameters.AddWithValue("@PartiCulars", SqlDbType.Image).Value      = oTransactionEntity.PartiCulars;
        cmd.Parameters.AddWithValue("@Posted", SqlDbType.VarChar).Value         = oTransactionEntity.Posted;
        cmd.Parameters.AddWithValue("@Approved", SqlDbType.VarChar).Value       = oTransactionEntity.Approved;
        cmd.Parameters.AddWithValue("@BillSL", SqlDbType.Image).Value           = oTransactionEntity.BillSL;
        cmd.Parameters.AddWithValue("@RevTranSL", SqlDbType.VarChar).Value      = oTransactionEntity.RevTranSL;
        cmd.Parameters.AddWithValue("@CreateBy", SqlDbType.Image).Value         = oTransactionEntity.CreateBy;
        cmd.Parameters.AddWithValue("@LastModifiedBy", SqlDbType.VarChar).Value = oTransactionEntity.LastModifiedBy;
        try
        {
            cmd.CommandType = CommandType.Text;
            cmd.ExecuteNonQuery();
            i = 1;
            int m = 0;
            for (int l = 0; l < oTransactionAccEntityList.Count; l++)
            {
                TransactionAccEntity oTransactionAccEntity = oTransactionAccEntityList[l];
                m += InsertTransactionAcc(oTransactionAccEntity, oSqlTransaction, con);
            }

            if (m == oTransactionAccEntityList.Count)
            {
                oSqlTransaction.Commit();
            }
        }
        catch { oSqlTransaction.Rollback(); }
        con.Close();
        return(i);
    }
示例#15
0
    public DataTable LoadGridView()
    {
        con             = oConnectionDatabase.DatabaseConnection();
        cmd             = new SqlCommand("select * from tblCountry", con);
        cmd.CommandType = CommandType.Text;
        SqlDataAdapter da = new SqlDataAdapter(cmd);

        DataTable dt = new DataTable();

        try
        {
            da.Fill(dt);
        }
        catch { }
        con.Close();
        return(dt);
    }
示例#16
0
    public int InsertClient(ClientEntity oClientEntity)
    {
        con = oConnectionDatabase.DatabaseConnection();
        int i = 0;



        cmd = new SqlCommand("INSERT INTO tblClient (ClientID,ClientBIO,MBHouseCode,ClientIntroducer,RoleCode,ClientTypeCode,"
                             + "ChargeCategoryCode,ClientPowerAtonyDetais,ClientSpecialComissionRate,ClientTransactionAccount,AccountType,ClientCreateBy,ClientLastModified,acccountOpeningDate)"
                             + "VALUES('" + oClientEntity.ClientID + "','" + oClientEntity.ClientBIO + "','" + oClientEntity.MBHouseCode + "','" + oClientEntity.ClientIntroducer + "',"
                             + "'" + oClientEntity.RoleCode + "','" + oClientEntity.ClientTypeCode + "','" + oClientEntity.ChargeCategoryCode + "','" + oClientEntity.ClientPowerAtonyDetais + "',"
                             + "'" + oClientEntity.ClientSpecialComissionRate + "','" + oClientEntity.ClientTransactionAccount + "','" + oClientEntity.AccountType + "','" + oClientEntity.ClientCreateBy + "',"
                             + "'" + oClientEntity.ClientLastModified + "','" + oClientEntity.AcccountOpeningDate + "')", con);
        try
        {
            cmd.CommandType = CommandType.Text;
            cmd.ExecuteNonQuery();
            i = 1;
        }
        catch { }
        con.Close();
        return(i);
    }
示例#17
0
    //Load Category Data
    private void LoadCategorydrpdownList()
    {
        SqlConnection con;
        SqlCommand    cmd;
        string        sqlQuery = null;

        oTransactionDAL = new TransactionDAL();
        if (getValue == "Branch Admin" && division == "Branch Admin")
        {
            sqlQuery        = "SELECT TOP 1 0 CATEGORY_ID, 'All Item' CATEGORY_NAME FROM ISS_CATEGORY ";
            con             = oConnectionDatabase.DatabaseConnection();
            cmd             = new SqlCommand(sqlQuery, con);
            cmd.CommandType = CommandType.Text;
            SqlDataAdapter da = new SqlDataAdapter(cmd);
            DataTable      dt = new DataTable();
            try
            {
                da.Fill(dt);
            }
            catch { }
            con.Close();
            drpCategory.DataSource     = dt;
            drpCategory.DataTextField  = "CATEGORY_NAME";
            drpCategory.DataValueField = "CATEGORY_ID";
            drpCategory.DataBind();
        }
        else
        {
            listatus = oTransactionDAL.GetOneReturnOne("ISS_USER_INFO", "USER_ID", Session["UserId"].ToString(), "HO_STATUS");
            if (listatus == 1)
            {
                Condition = " WHERE HO_STATUS = 1";
            }
            else
            {
                Condition = " WHERE BRANCH_STATUS = 1";
            }
            DataTable dt = oTransactionDAL.GetCategory(Condition);
            drpCategory.DataSource     = dt;
            drpCategory.DataTextField  = "CATEGORY_NAME";
            drpCategory.DataValueField = "CATEGORY_ID";
            drpCategory.DataBind();
        }
    }
示例#18
0
    public int InsertGroupAccount(GroupAccountEntity oGroupAccountEntity)
    {
        con = oConnectionDatabase.DatabaseConnection();
        int i = 0;

        cmd = new SqlCommand("INSERT INTO tblGroupAccount (GrpAccNo,AccGTSL,GrpAccName,Remarks,CrateBy,LastModifiedBy) VALUES('" + oGroupAccountEntity.GrpAccNo + "','" + oGroupAccountEntity.AccGTSL + "','" + oGroupAccountEntity.GrpAccName + "','" + oGroupAccountEntity.Remarks + "','" + oGroupAccountEntity.CrateBy + "','" + oGroupAccountEntity.LastModifiedBy + "')", con);
        try
        {
            cmd.CommandType = CommandType.Text;
            cmd.ExecuteNonQuery();
            i = 1;
        }
        catch { }
        con.Close();
        return(i);
    }
示例#19
0
    protected void btnSearch_Click(object sender, EventArgs e)
    {
        ReturnVal oRtnValue = new ReturnVal();

        //string BrCode = oRtnValue.ReturnValue("View_BranchInfo", "userid", "'" + Session["userID"] + "'", "BranchCode");

        if (oRtnValue.ReturnValue("LoanAplicationFinancial", "AcountNo", "'" + txtAplication.Text + "' and sub_Sl ='" + txtPlSL.Text + "'", "AcountNo") != "")
        {
            ConnectionDatabase oConnectionDatabase = new ConnectionDatabase();
            SqlConnection      con;
            SqlCommand         cmd;
            string             condition = "Where AcountNo='" + txtAplication.Text + "' and sub_Sl ='" + txtPlSL.Text + "'";
            con             = oConnectionDatabase.DatabaseConnection();
            cmd             = new SqlCommand("SELECT *  from LoanAplicationFinancial  " + condition, con);
            cmd.CommandType = CommandType.Text;
            SqlDataAdapter da = new SqlDataAdapter(cmd);

            DataTable dt = new DataTable();
            try
            {
                da.Fill(dt);
            }
            catch { }
            con.Close();


            DrpType.Text           = dt.Rows[0]["Type"].ToString();
            DropNature.Text        = dt.Rows[0]["Nature"].ToString();
            txtExistingLimmit.Text = dt.Rows[0]["ExistingLimitAmount"].ToString();

            txtProposedLimit.Text = dt.Rows[0]["ProposedLimit"].ToString();

            txtRevisedLimit.Text = dt.Rows[0]["RevisedLimit"].ToString();


            txtOutStanding.Text = dt.Rows[0]["Outstanding"].ToString();

            txtOverDeu.Text = dt.Rows[0]["OverDue"].ToString();

            txtEOL.Text = dt.Rows[0]["EOL"].ToString();
            txtExistingSanction.Text = dt.Rows[0]["ExistingSanction"].ToString();

            txtSanctionAmount.Text = dt.Rows[0]["ProposedSanction"].ToString();

            txtRevisedSanction.Text = dt.Rows[0]["RevisedSanction"].ToString();

            txtexixtingTenor.Text = dt.Rows[0]["ExistingTenor"].ToString();

            txtProposedTenor.Text = dt.Rows[0]["ProposedTenor"].ToString();

            txtTenorRevised.Text = dt.Rows[0]["RevisedTenor"].ToString();

            txtExixtingInstallmentAmount.Text = dt.Rows[0]["ExistingInstallmentAmount"].ToString();

            txtProposedInstallment.Text = dt.Rows[0]["ProposedInstallmentAmount"].ToString();

            txtRevisedInstallment.Text = dt.Rows[0]["RevisedInstallmentAmount"].ToString();

            txtExistingLCComission.Text = dt.Rows[0]["ExistingLC_Comission"].ToString();

            txtProposedLCComission.Text = dt.Rows[0]["ProposedLC_Comission"].ToString();

            txtRevisedLCComission.Text = dt.Rows[0]["RevisedLC_Comission"].ToString();

            txtExistingAcceptedComission.Text = dt.Rows[0]["ExistingAcceptedComision"].ToString();

            txtAcceptedCommisionProposed.Text = dt.Rows[0]["proposedAcceptedComision"].ToString();

            txtAcceptedComissionRevised.Text = dt.Rows[0]["RevisedAcceptedComision"].ToString();
            if (!string.IsNullOrEmpty(dt.Rows[0]["SanctionDate"].ToString()))
            {
                txtSanctionDate.Text = DateTime.Parse(dt.Rows[0]["SanctionDate"].ToString()).ToString("dd/MM/yyyy");
            }

            if (!string.IsNullOrEmpty(dt.Rows[0]["ProposedDate"].ToString()))
            {
                txtProposedDate.Text = DateTime.Parse(dt.Rows[0]["SanctionDate"].ToString()).ToString("dd/MM/yyyy");
            }



            txtExistingInterestRate.Text = dt.Rows[0]["ExistingInttRate"].ToString();

            txtProposedInttRate.Text = dt.Rows[0]["ProposedInttRate"].ToString();

            txtRevisedInttRate.Text = dt.Rows[0]["RevisedInttRate"].ToString();

            txtExistingGracePriod.Text  = dt.Rows[0]["ExixtingGrascePriod"].ToString();
            txtProposedGracePreiod.Text = dt.Rows[0]["ProposedGrascePriod"].ToString();
            txtRevisedGracePreiod.Text  = dt.Rows[0]["RevisedGrascePriod"].ToString();

            DropStatus.Text = dt.Rows[0]["Status"].ToString();
            txtMargin.Text  = dt.Rows[0]["Margin"].ToString();

            if (!string.IsNullOrEmpty(dt.Rows[0]["ValidityDate"].ToString()))
            {
                txtvalidityDate.Text = DateTime.Parse(dt.Rows[0]["ValidityDate"].ToString()).ToString("dd/MM/yyyy");
            }


            if (!string.IsNullOrEmpty(dt.Rows[0]["GroupSL"].ToString()))
            {
                YrChkBox.Checked = true;
                Group.Visible    = true;
                SubGroup.Visible = true;


                drpGroup.SelectedValue = dt.Rows[0]["GroupSL"].ToString();
                LoadSubGroup(1, drpGroup.SelectedValue);

                if (!string.IsNullOrEmpty(dt.Rows[0]["SubGroupSL"].ToString()))
                {
                    DropSubGroup.SelectedValue = dt.Rows[0]["SubGroupSL"].ToString();

                    //ReturnVal oRtnValue1 = new ReturnVal();
                    //DropSubGroup.Text = oRtnValue.ReturnValue("SubGroupInfo", "SubgroupSL", "'" + dt.Rows[0]["SubGroupSL"].ToString() + "'", "SubGroupName");
                }
            }
            else
            {
                YrChkBox.Checked = false;
                Group.Visible    = false;
                SubGroup.Visible = false;
            }
        }
        else
        {
            //txtPlSL.Text = "";
            DrpType.Text                      = "";
            DropNature.Text                   = "";
            txtExistingLimmit.Text            = "";
            txtProposedLimit.Text             = "";
            txtRevisedLimit.Text              = "";
            txtTenorRevised.Text              = "";
            txtOutStanding.Text               = "";
            txtOverDeu.Text                   = "";
            txtEOL.Text                       = "";
            txtExistingSanction.Text          = "";
            txtSanctionAmount.Text            = "";
            txtRevisedSanction.Text           = "";
            txtexixtingTenor.Text             = "";
            txtProposedTenor.Text             = "";
            txtTenorRevised.Text              = "";
            txtExixtingInstallmentAmount.Text = "";
            txtProposedInstallment.Text       = "";
            txtRevisedInstallment.Text        = "";
            txtExistingLCComission.Text       = "";
            txtProposedLCComission.Text       = "";
            txtRevisedLCComission.Text        = "";
            txtExistingAcceptedComission.Text = "";
            txtAcceptedCommisionProposed.Text = "";
            txtAcceptedComissionRevised.Text  = "";

            txtSanctionDate.Text         = "";
            txtProposedDate.Text         = "";
            txtExistingInterestRate.Text = "";
            txtProposedInttRate.Text     = "";
            txtRevisedInttRate.Text      = "";
            txtExistingGracePriod.Text   = "";
            txtProposedGracePreiod.Text  = "";
            txtRevisedGracePreiod.Text   = "";
            DropStatus.Text      = "";
            txtMargin.Text       = "";
            txtvalidityDate.Text = "";
        }
    }
示例#20
0
    public int InsertChargeItem(ChargeItemEntity oChargeItemEntity)
    {
        con = oConnectionDatabase.DatabaseConnection();
        int i = 0;

        cmd = new SqlCommand("INSERT INTO tblChargeItem (ChargeCode,ChargeDetails,ChargeAmount,CApplyLowerLimit,CApplyHigherLimit,ChargePercentage,ChargeItemType,ChargeRemarks,ChargeCreatedBy,ChargeLastModifiedBy) VALUES('" + oChargeItemEntity.ChargeCode + "','" + oChargeItemEntity.ChargeDetails + "','" + oChargeItemEntity.ChargeAmount + "','" + oChargeItemEntity.CApplyLowerLimit + "','" + oChargeItemEntity.CApplyHigherLimit + "','" + oChargeItemEntity.ChargePercentage + "','" + oChargeItemEntity.ChargeItemType + "','" + oChargeItemEntity.ChargeRemarks + "','" + oChargeItemEntity.ChargeCreatedBy + "','" + oChargeItemEntity.ChargeLastModifiedBy + "')", con);
        try
        {
            cmd.CommandType = CommandType.Text;
            cmd.ExecuteNonQuery();
            i = 1;
        }
        catch { }
        con.Close();
        return(i);
    }
示例#21
0
    public void pickReqData()
    {
        ldConditionOne   = 0.0;
        ldConditionTwo   = 0.0;
        ldConditionThree = 0.0;
        ldConditionFour  = 0.0;
        ldConditionFive  = 0.0;
        ldConditionSix   = 0.0;
        ldConditionSeven = 0.0;
        ldConditionEight = 0.0;
        ldConditionNine  = 0.0;
        ldConditionTen   = 0.0;
        string Subcategory = "";
        double balance     = 0;
        string BranchCode  = branchDropDownList.SelectedValue.ToString();

        con             = oConnectionDatabase.DatabaseConnection();
        sqlQuery        = "SELECT * FROM [ISS].[dbo].[ISS_TRANSACTION] WHERE TRAN_ID = '" + pssTransactionId + "' AND BRANCH_CODE = '" + BranchCode + "' AND SUBCATEGORY_ID IN ('17102','17104','17106','18101','18102','18103','18104','18105','20101','20102','20103','21101','21102','22101','22102','22103','28101','28102','28103','28104','31101','31102','31103','31104','31110','31111','31112','31113','31114') ";
        cmd             = new SqlCommand(sqlQuery, con);
        cmd.CommandType = CommandType.Text;
        SqlDataAdapter da = new SqlDataAdapter(cmd);

        using (SqlDataReader dr = cmd.ExecuteReader())
        {
            while (dr.Read())
            {
                try
                {
                    Subcategory = Convert.ToString(dr["SUBCATEGORY_ID"]);
                    balance     = Convert.ToDouble(dr["AMOUNT"]);
                    if (Subcategory == "17102")
                    {
                        ldtotlnOut = balance;
                    }
                    else if (Subcategory == "17104")
                    {
                        ldovrduelnAmount = balance;
                    }
                    else if (Subcategory == "17106")
                    {
                        ldtotnplOut = balance;
                    }
                    else if (Subcategory == "28101")
                    {
                        ldtotresculedlnOut = balance;
                    }
                    else if (Subcategory == "28104")
                    {
                        ldtotdeclassifiedlnOut = balance;
                    }
                    else if (Subcategory == "31104")
                    {
                        ldtotOutofAccepIssued = balance;
                    }
                    else if (Subcategory == "31110")
                    {
                        ldtotOutBlnceofIssedBnkGrnt = balance;
                    }
                    else if (Subcategory == "18101" || Subcategory == "18102" || Subcategory == "18103" || Subcategory == "18104" || Subcategory == "18105")
                    {
                        if (Subcategory == "18101" || Subcategory == "18102")
                        {
                            ldConditionOne = ldConditionOne + balance;
                        }
                        else
                        {
                            ldConditionOne = ldConditionOne + balance;
                            ldConditionTwo = ldConditionTwo + balance;
                        }
                    }
                    else if (Subcategory == "20101" || Subcategory == "20102" || Subcategory == "20103")
                    {
                        ldConditionFour = ldConditionFour + balance;
                    }
                    else if (Subcategory == "21101" || Subcategory == "21102")
                    {
                        ldConditionFive = ldConditionFive + balance;
                    }
                    else if (Subcategory == "22101" || Subcategory == "22102" || Subcategory == "22103")
                    {
                        ldConditionSix = ldConditionSix + balance;
                    }
                    else if (Subcategory == "28102" || Subcategory == "28103")
                    {
                        ldConditionSeven = ldConditionSeven + balance;
                    }
                    else if (Subcategory == "31101" || Subcategory == "31102" || Subcategory == "31103")
                    {
                        ldConditionNine = ldConditionNine + balance;
                    }
                    else if (Subcategory == "31111" || Subcategory == "31112" || Subcategory == "31113" || Subcategory == "31114")
                    {
                        ldConditionTen = ldConditionTen + balance;
                    }
                }
                catch { }
            }
            dr.Close();
        }
        con.Close();
    }