Example #1
0
    public int DeleteSubGroupAccount(SubGroupAccountEntity oSubGroupAccountEntity)
    {
        con = oConnectionDatabase.DatabaseConnection();
        int i = 0;

        cmd = new SqlCommand("DELETE FROM tblSubGroupAccount WHERE SGrpAccSL=" + oSubGroupAccountEntity.SGrpAccSL, con);
        try
        {
            cmd.CommandType = CommandType.Text;
            cmd.ExecuteNonQuery();
            i = 1;
        }
        catch { }
        con.Close();
        return(i);
    }
Example #2
0
    public int UpdateSubGroupAccount(SubGroupAccountEntity oSubGroupAccountEntity)
    {
        con = oConnectionDatabase.DatabaseConnection();
        int i = 0;

        cmd = new SqlCommand("UPDATE  tblSubGroupAccount SET SGrpAccNo='" + oSubGroupAccountEntity.SGrpAccNo + "',GrpAccSL='" + oSubGroupAccountEntity.GrpAccSL + "',"
                             + "SGrpAccName='" + oSubGroupAccountEntity.SGrpAccName + "',Remarks='" + oSubGroupAccountEntity.Remarks + "',LastModifiedBy='" + oSubGroupAccountEntity.LastModifiedBy + "' WHERE SGrpAccSL=" + oSubGroupAccountEntity.SGrpAccSL, con);
        try
        {
            cmd.CommandType = CommandType.Text;
            cmd.ExecuteNonQuery();
            i = 1;
        }
        catch { }
        con.Close();
        return(i);
    }
Example #3
0
    public int InsertSubGroupAccount(SubGroupAccountEntity oSubGroupAccountEntity)
    {
        con = oConnectionDatabase.DatabaseConnection();
        int i = 0;

        cmd = new SqlCommand("INSERT INTO tblSubGroupAccount (SGrpAccNo,GrpAccSL,SGrpAccName,Remarks,"
                             + "CrateBy,LastModifiedBy)"
                             + "VALUES('" + oSubGroupAccountEntity.SGrpAccNo + "','" + oSubGroupAccountEntity.GrpAccSL + "','" + oSubGroupAccountEntity.SGrpAccName + "',"
                             + "'" + oSubGroupAccountEntity.Remarks + "'," + "'" + oSubGroupAccountEntity.CrateBy + "'," + "'" + oSubGroupAccountEntity.LastModifiedBy + "')", con);
        try
        {
            cmd.CommandType = CommandType.Text;
            cmd.ExecuteNonQuery();
            i = 1;
        }
        catch { }
        con.Close();
        return(i);
    }