示例#1
0
 public static ACC_BasicAccount GetACC_BasicAccountByBasicAccountID(int BasicAccountID)
 {
     ACC_BasicAccount aCC_BasicAccount = new ACC_BasicAccount();
     SqlACC_BasicAccountProvider sqlACC_BasicAccountProvider = new SqlACC_BasicAccountProvider();
     aCC_BasicAccount = sqlACC_BasicAccountProvider.GetACC_BasicAccountByBasicAccountID(BasicAccountID);
     return aCC_BasicAccount;
 }
示例#2
0
 public static ACC_BasicAccount GetCOMN_RowStatusByRowStatusID(int RowStatusID)
 {
     ACC_BasicAccount aCC_BasicAccount = new ACC_BasicAccount();
     SqlACC_BasicAccountProvider sqlACC_BasicAccountProvider = new SqlACC_BasicAccountProvider();
     aCC_BasicAccount = sqlACC_BasicAccountProvider.GetACC_BasicAccountByRowStatusID(RowStatusID);
     return aCC_BasicAccount;
 }
示例#3
0
 protected void btnUpdate_Click(object sender, EventArgs e)
 {
     try
     {
         ACC_BasicAccount aCC_BasicAccount = new ACC_BasicAccount();
         aCC_BasicAccount.BasicAccountID = int.Parse(Request.QueryString["ID"].ToString());
         aCC_BasicAccount.BasicAccountCode = "";
         aCC_BasicAccount.BasicAccountName = txtBasicAccountName.Text;
         aCC_BasicAccount.Description = txtDescription.Text;
         aCC_BasicAccount.AddedBy = Profile.card_id;
         aCC_BasicAccount.AddedDate = DateTime.Now;
         aCC_BasicAccount.UpdatedBy = Profile.card_id;
         aCC_BasicAccount.UpdateDate = DateTime.Now;
         aCC_BasicAccount.RowStatusID = 1;
         bool resutl = ACC_BasicAccountManager.UpdateACC_BasicAccount(aCC_BasicAccount);
         Response.Redirect("AdminDisplayACC_BasicAccount.aspx");
     }
     catch (Exception ex)
     {
     }
 }
示例#4
0
    protected void btnAdd_Click(object sender, EventArgs e)
    {
        try
        {
            ACC_BasicAccount aCC_BasicAccount = new ACC_BasicAccount();
            //	aCC_BasicAccount.BasicAccountID=  int.Parse(ddlBasicAccountID.SelectedValue);
            aCC_BasicAccount.BasicAccountCode = "";
            aCC_BasicAccount.BasicAccountName = txtBasicAccountName.Text;
            aCC_BasicAccount.Description = txtDescription.Text;
            aCC_BasicAccount.AddedBy = Profile.card_id;
            aCC_BasicAccount.AddedDate = DateTime.Now;
            aCC_BasicAccount.UpdatedBy = Profile.card_id;
            aCC_BasicAccount.UpdateDate = DateTime.Now;
            aCC_BasicAccount.RowStatusID = 1;
            int resutl = ACC_BasicAccountManager.InsertACC_BasicAccount(aCC_BasicAccount);
            Response.Redirect("AdminDisplayACC_BasicAccount.aspx");
        }

        catch (Exception ex)
        {
        }
    }
示例#5
0
 public static bool UpdateACC_BasicAccount(ACC_BasicAccount aCC_BasicAccount)
 {
     SqlACC_BasicAccountProvider sqlACC_BasicAccountProvider = new SqlACC_BasicAccountProvider();
     return sqlACC_BasicAccountProvider.UpdateACC_BasicAccount(aCC_BasicAccount);
 }
示例#6
0
 public static int InsertACC_BasicAccount(ACC_BasicAccount aCC_BasicAccount)
 {
     SqlACC_BasicAccountProvider sqlACC_BasicAccountProvider = new SqlACC_BasicAccountProvider();
     return sqlACC_BasicAccountProvider.InsertACC_BasicAccount(aCC_BasicAccount);
 }
示例#7
0
    public ACC_BasicAccount GetACC_BasicAccountFromReader(IDataReader reader)
    {
        try
        {
            ACC_BasicAccount aCC_BasicAccount = new ACC_BasicAccount
                (

                     DataAccessObject.IsNULL<int>(reader["BasicAccountID"]),
                     DataAccessObject.IsNULL<string>(reader["BasicAccountCode"]),
                     DataAccessObject.IsNULL<string>(reader["BasicAccountName"]),
                     DataAccessObject.IsNULL<string>(reader["Description"]),
                     DataAccessObject.IsNULL<string>(reader["AddedBy"].ToString()),
                     DataAccessObject.IsNULL<DateTime>(reader["AddedDate"]),
                     DataAccessObject.IsNULL<string>(reader["UpdatedBy"].ToString()),
                     DataAccessObject.IsNULL<DateTime>(reader["UpdateDate"]),
                     DataAccessObject.IsNULL<int>(reader["RowStatusID"])
                );
             return aCC_BasicAccount;
        }
        catch(Exception ex)
        {
            return null;
        }
    }
示例#8
0
    public bool UpdateACC_BasicAccount(ACC_BasicAccount aCC_BasicAccount)
    {
        using (SqlConnection connection = new SqlConnection(this.ConnectionString))
        {
            SqlCommand cmd = new SqlCommand("UpdateACC_BasicAccount", connection);
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.Add("@BasicAccountID", SqlDbType.Int).Value = aCC_BasicAccount.BasicAccountID;
            cmd.Parameters.Add("@BasicAccountCode", SqlDbType.NVarChar).Value = aCC_BasicAccount.BasicAccountCode;
            cmd.Parameters.Add("@BasicAccountName", SqlDbType.NVarChar).Value = aCC_BasicAccount.BasicAccountName;
            cmd.Parameters.Add("@Description", SqlDbType.NText).Value = aCC_BasicAccount.Description;
            cmd.Parameters.Add("@UpdatedBy", SqlDbType.NVarChar).Value = aCC_BasicAccount.UpdatedBy;
            cmd.Parameters.Add("@UpdateDate", SqlDbType.DateTime).Value = aCC_BasicAccount.UpdateDate;
            cmd.Parameters.Add("@RowStatusID", SqlDbType.Int).Value = aCC_BasicAccount.RowStatusID;
            connection.Open();

            int result = cmd.ExecuteNonQuery();
            return result == 1;
        }
    }
示例#9
0
    private void showACC_BasicAccountData()
    {
        ACC_BasicAccount aCC_BasicAccount  = new ACC_BasicAccount ();
         	aCC_BasicAccount = ACC_BasicAccountManager.GetACC_BasicAccountByBasicAccountID(Int32.Parse(Request.QueryString["ID"]));

         	txtBasicAccountName.Text =aCC_BasicAccount.BasicAccountName.ToString();
         	txtDescription.Text =aCC_BasicAccount.Description.ToString();
    }