protected void btnUpdate_Click(object sender, EventArgs e) { ACC_ChartOfAccountLabel3 aCC_ChartOfAccountLabel3 = new ACC_ChartOfAccountLabel3(); aCC_ChartOfAccountLabel3 = ACC_ChartOfAccountLabel3Manager.GetACC_ChartOfAccountLabel3ByID(Int32.Parse(hfaCC_ChartOfAccountLabel3ID.Value)); ACC_ChartOfAccountLabel3 tempACC_ChartOfAccountLabel3 = new ACC_ChartOfAccountLabel3(); tempACC_ChartOfAccountLabel3.ACC_ChartOfAccountLabel3ID = aCC_ChartOfAccountLabel3.ACC_ChartOfAccountLabel3ID; tempACC_ChartOfAccountLabel3.Code = txtCode.Text; tempACC_ChartOfAccountLabel3.ACC_ChartOfAccountLabel2ID = Int32.Parse(ddlACC_ChartOfAccountLabel2.SelectedValue); tempACC_ChartOfAccountLabel3.ChartOfAccountLabel3Text = txtChartOfAccountLabel3Text.Text; tempACC_ChartOfAccountLabel3.ExtraField1 = txtExtraField1.Text; tempACC_ChartOfAccountLabel3.ExtraField2 = txtExtraField2.Text; tempACC_ChartOfAccountLabel3.ExtraField3 = txtExtraField3.Text; tempACC_ChartOfAccountLabel3.AddedBy = getLogin().LoginID; tempACC_ChartOfAccountLabel3.AddedDate = DateTime.Now; tempACC_ChartOfAccountLabel3.UpdatedBy = getLogin().LoginID; tempACC_ChartOfAccountLabel3.UpdatedDate = DateTime.Now; tempACC_ChartOfAccountLabel3.RowStatusID = Int32.Parse(ddlRowStatus.SelectedValue); bool result = ACC_ChartOfAccountLabel3Manager.UpdateACC_ChartOfAccountLabel3(tempACC_ChartOfAccountLabel3); showACC_ChartOfAccountLabel3Grid(); btnUpdate.Visible = false; btnAdd.Visible = true; btnClear_Click(this, new EventArgs()); }
public ACC_ChartOfAccountLabel3 GetACC_ChartOfAccountLabel3FromReader(IDataReader reader) { try { ACC_ChartOfAccountLabel3 aCC_ChartOfAccountLabel3 = new ACC_ChartOfAccountLabel3 ( (int)reader["ACC_ChartOfAccountLabel3ID"], reader["Code"].ToString(), (int)reader["ACC_ChartOfAccountLabel2ID"], reader["ChartOfAccountLabel3Text"].ToString(), reader["ExtraField1"].ToString(), reader["ExtraField2"].ToString(), reader["ExtraField3"].ToString(), (int)reader["AddedBy"], (DateTime)reader["AddedDate"], (int)reader["UpdatedBy"], (DateTime)reader["UpdatedDate"], (int)reader["RowStatusID"] ); return aCC_ChartOfAccountLabel3; } catch(Exception ex) { return null; } }
public static ACC_ChartOfAccountLabel3 GetACC_ChartOfAccountLabel3ByID(int id) { ACC_ChartOfAccountLabel3 aCC_ChartOfAccountLabel3 = new ACC_ChartOfAccountLabel3(); SqlACC_ChartOfAccountLabel3Provider sqlACC_ChartOfAccountLabel3Provider = new SqlACC_ChartOfAccountLabel3Provider(); aCC_ChartOfAccountLabel3 = sqlACC_ChartOfAccountLabel3Provider.GetACC_ChartOfAccountLabel3ByID(id); return aCC_ChartOfAccountLabel3; }
public ACC_ChartOfAccountLabel3 GetACC_ChartOfAccountLabel3FromReader(IDataReader reader) { try { ACC_ChartOfAccountLabel3 aCC_ChartOfAccountLabel3 = new ACC_ChartOfAccountLabel3 ( (int)reader["ACC_ChartOfAccountLabel3ID"], reader["Code"].ToString(), (int)reader["ACC_ChartOfAccountLabel2ID"], reader["ChartOfAccountLabel3Text"].ToString(), reader["ExtraField1"].ToString(), reader["ExtraField2"].ToString(), reader["ExtraField3"].ToString(), (int)reader["AddedBy"], (DateTime)reader["AddedDate"], (int)reader["UpdatedBy"], (DateTime)reader["UpdatedDate"], (int)reader["RowStatusID"] ); return(aCC_ChartOfAccountLabel3); } catch (Exception ex) { return(null); } }
public static ACC_ChartOfAccountLabel3 GetACC_ChartOfAccountLabel3ByID(int id) { ACC_ChartOfAccountLabel3 aCC_ChartOfAccountLabel3 = new ACC_ChartOfAccountLabel3(); SqlACC_ChartOfAccountLabel3Provider sqlACC_ChartOfAccountLabel3Provider = new SqlACC_ChartOfAccountLabel3Provider(); aCC_ChartOfAccountLabel3 = sqlACC_ChartOfAccountLabel3Provider.GetACC_ChartOfAccountLabel3ByID(id); return(aCC_ChartOfAccountLabel3); }
private void showACC_ChartOfAccountLabel3Data() { ACC_ChartOfAccountLabel3 aCC_ChartOfAccountLabel3 = new ACC_ChartOfAccountLabel3(); aCC_ChartOfAccountLabel3 = ACC_ChartOfAccountLabel3Manager.GetACC_ChartOfAccountLabel3ByID(Int32.Parse(hfaCC_ChartOfAccountLabel3ID.Value)); txtCode.Text = aCC_ChartOfAccountLabel3.Code; ddlACC_ChartOfAccountLabel2.SelectedValue = aCC_ChartOfAccountLabel3.ACC_ChartOfAccountLabel2ID.ToString(); txtChartOfAccountLabel3Text.Text = aCC_ChartOfAccountLabel3.ChartOfAccountLabel3Text; txtExtraField1.Text = aCC_ChartOfAccountLabel3.ExtraField1; txtExtraField2.Text = aCC_ChartOfAccountLabel3.ExtraField2; txtExtraField3.Text = aCC_ChartOfAccountLabel3.ExtraField3; txtAddedBy.Text = aCC_ChartOfAccountLabel3.AddedBy.ToString(); txtUpdatedBy.Text = aCC_ChartOfAccountLabel3.UpdatedBy.ToString(); //txtUpdatedDate.Text = aCC_ChartOfAccountLabel3.UpdatedDate; ddlRowStatus.SelectedValue = aCC_ChartOfAccountLabel3.RowStatusID.ToString(); }
protected void btnAdd_Click(object sender, EventArgs e) { ACC_ChartOfAccountLabel3 aCC_ChartOfAccountLabel3 = new ACC_ChartOfAccountLabel3(); aCC_ChartOfAccountLabel3.Code = txtCode.Text; aCC_ChartOfAccountLabel3.ACC_ChartOfAccountLabel2ID = Int32.Parse(ddlACC_ChartOfAccountLabel2.SelectedValue); aCC_ChartOfAccountLabel3.ChartOfAccountLabel3Text = txtChartOfAccountLabel3Text.Text; aCC_ChartOfAccountLabel3.ExtraField1 = txtExtraField1.Text; aCC_ChartOfAccountLabel3.ExtraField2 = txtExtraField2.Text; aCC_ChartOfAccountLabel3.ExtraField3 = txtExtraField3.Text; aCC_ChartOfAccountLabel3.AddedBy = getLogin().LoginID; aCC_ChartOfAccountLabel3.AddedDate = DateTime.Now; aCC_ChartOfAccountLabel3.UpdatedBy = getLogin().LoginID; aCC_ChartOfAccountLabel3.UpdatedDate = DateTime.Now; aCC_ChartOfAccountLabel3.RowStatusID = Int32.Parse(ddlRowStatus.SelectedValue); int resutl = ACC_ChartOfAccountLabel3Manager.InsertACC_ChartOfAccountLabel3(aCC_ChartOfAccountLabel3); Response.Redirect("AdminACC_ChartOfAccountLabel3Display.aspx"); }
protected void btnAdd_Click(object sender, EventArgs e) { ACC_ChartOfAccountLabel3 aCC_ChartOfAccountLabel3 = new ACC_ChartOfAccountLabel3(); aCC_ChartOfAccountLabel3.Code = txtCode.Text; aCC_ChartOfAccountLabel3.ACC_ChartOfAccountLabel2ID = Int32.Parse(ddlACC_ChartOfAccountLabel2.SelectedValue); aCC_ChartOfAccountLabel3.ChartOfAccountLabel3Text = txtChartOfAccountLabel3Text.Text; aCC_ChartOfAccountLabel3.ExtraField1 = txtExtraField1.Text; aCC_ChartOfAccountLabel3.ExtraField2 = txtExtraField2.Text; aCC_ChartOfAccountLabel3.ExtraField3 = txtExtraField3.Text; aCC_ChartOfAccountLabel3.AddedBy = getLogin().LoginID; aCC_ChartOfAccountLabel3.AddedDate = DateTime.Now; aCC_ChartOfAccountLabel3.UpdatedBy = getLogin().LoginID; aCC_ChartOfAccountLabel3.UpdatedDate = DateTime.Now; aCC_ChartOfAccountLabel3.RowStatusID = Int32.Parse(ddlRowStatus.SelectedValue); int resutl = ACC_ChartOfAccountLabel3Manager.InsertACC_ChartOfAccountLabel3(aCC_ChartOfAccountLabel3); showACC_ChartOfAccountLabel3Grid(); btnClear_Click(this, new EventArgs()); }
protected void btnUpdate_Click(object sender, EventArgs e) { ACC_ChartOfAccountLabel3 aCC_ChartOfAccountLabel3 = new ACC_ChartOfAccountLabel3(); aCC_ChartOfAccountLabel3 = ACC_ChartOfAccountLabel3Manager.GetACC_ChartOfAccountLabel3ByID(Int32.Parse(Request.QueryString["aCC_ChartOfAccountLabel3ID"])); ACC_ChartOfAccountLabel3 tempACC_ChartOfAccountLabel3 = new ACC_ChartOfAccountLabel3(); tempACC_ChartOfAccountLabel3.ACC_ChartOfAccountLabel3ID = aCC_ChartOfAccountLabel3.ACC_ChartOfAccountLabel3ID; tempACC_ChartOfAccountLabel3.Code = txtCode.Text; tempACC_ChartOfAccountLabel3.ACC_ChartOfAccountLabel2ID = Int32.Parse(ddlACC_ChartOfAccountLabel2.SelectedValue); tempACC_ChartOfAccountLabel3.ChartOfAccountLabel3Text = txtChartOfAccountLabel3Text.Text; tempACC_ChartOfAccountLabel3.ExtraField1 = txtExtraField1.Text; tempACC_ChartOfAccountLabel3.ExtraField2 = txtExtraField2.Text; tempACC_ChartOfAccountLabel3.ExtraField3 = txtExtraField3.Text; tempACC_ChartOfAccountLabel3.AddedBy = getLogin().LoginID; tempACC_ChartOfAccountLabel3.AddedDate = DateTime.Now; tempACC_ChartOfAccountLabel3.UpdatedBy = getLogin().LoginID; tempACC_ChartOfAccountLabel3.UpdatedDate = DateTime.Now; tempACC_ChartOfAccountLabel3.RowStatusID = Int32.Parse(ddlRowStatus.SelectedValue); bool result = ACC_ChartOfAccountLabel3Manager.UpdateACC_ChartOfAccountLabel3(tempACC_ChartOfAccountLabel3); Response.Redirect("AdminACC_ChartOfAccountLabel3Display.aspx"); }
public bool UpdateACC_ChartOfAccountLabel3(ACC_ChartOfAccountLabel3 aCC_ChartOfAccountLabel3) { using (SqlConnection connection = new SqlConnection(this.ConnectionString)) { SqlCommand cmd = new SqlCommand("GP_UpdateACC_ChartOfAccountLabel3", connection); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add("@ACC_ChartOfAccountLabel3ID", SqlDbType.Int).Value = aCC_ChartOfAccountLabel3.ACC_ChartOfAccountLabel3ID; cmd.Parameters.Add("@Code", SqlDbType.NVarChar).Value = aCC_ChartOfAccountLabel3.Code; cmd.Parameters.Add("@ACC_ChartOfAccountLabel2ID", SqlDbType.Int).Value = aCC_ChartOfAccountLabel3.ACC_ChartOfAccountLabel2ID; cmd.Parameters.Add("@ChartOfAccountLabel3Text", SqlDbType.NVarChar).Value = aCC_ChartOfAccountLabel3.ChartOfAccountLabel3Text; cmd.Parameters.Add("@ExtraField1", SqlDbType.NVarChar).Value = aCC_ChartOfAccountLabel3.ExtraField1; cmd.Parameters.Add("@ExtraField2", SqlDbType.NVarChar).Value = aCC_ChartOfAccountLabel3.ExtraField2; cmd.Parameters.Add("@ExtraField3", SqlDbType.NVarChar).Value = aCC_ChartOfAccountLabel3.ExtraField3; cmd.Parameters.Add("@AddedBy", SqlDbType.Int).Value = aCC_ChartOfAccountLabel3.AddedBy; cmd.Parameters.Add("@AddedDate", SqlDbType.DateTime).Value = aCC_ChartOfAccountLabel3.AddedDate; cmd.Parameters.Add("@UpdatedBy", SqlDbType.Int).Value = aCC_ChartOfAccountLabel3.UpdatedBy; cmd.Parameters.Add("@UpdatedDate", SqlDbType.DateTime).Value = aCC_ChartOfAccountLabel3.UpdatedDate; cmd.Parameters.Add("@RowStatusID", SqlDbType.Int).Value = aCC_ChartOfAccountLabel3.RowStatusID; connection.Open(); int result = cmd.ExecuteNonQuery(); return(result == 1); } }
public static bool UpdateACC_ChartOfAccountLabel3(ACC_ChartOfAccountLabel3 aCC_ChartOfAccountLabel3) { SqlACC_ChartOfAccountLabel3Provider sqlACC_ChartOfAccountLabel3Provider = new SqlACC_ChartOfAccountLabel3Provider(); return sqlACC_ChartOfAccountLabel3Provider.UpdateACC_ChartOfAccountLabel3(aCC_ChartOfAccountLabel3); }
public static int InsertACC_ChartOfAccountLabel3(ACC_ChartOfAccountLabel3 aCC_ChartOfAccountLabel3) { SqlACC_ChartOfAccountLabel3Provider sqlACC_ChartOfAccountLabel3Provider = new SqlACC_ChartOfAccountLabel3Provider(); return sqlACC_ChartOfAccountLabel3Provider.InsertACC_ChartOfAccountLabel3(aCC_ChartOfAccountLabel3); }
public static bool UpdateACC_ChartOfAccountLabel3(ACC_ChartOfAccountLabel3 aCC_ChartOfAccountLabel3) { SqlACC_ChartOfAccountLabel3Provider sqlACC_ChartOfAccountLabel3Provider = new SqlACC_ChartOfAccountLabel3Provider(); return(sqlACC_ChartOfAccountLabel3Provider.UpdateACC_ChartOfAccountLabel3(aCC_ChartOfAccountLabel3)); }
private void showACC_ChartOfAccountLabel3Data() { ACC_ChartOfAccountLabel3 aCC_ChartOfAccountLabel3 = new ACC_ChartOfAccountLabel3(); aCC_ChartOfAccountLabel3 = ACC_ChartOfAccountLabel3Manager.GetACC_ChartOfAccountLabel3ByID(Int32.Parse(Request.QueryString["aCC_ChartOfAccountLabel3ID"])); txtCode.Text = aCC_ChartOfAccountLabel3.Code; ddlACC_ChartOfAccountLabel2.SelectedValue = aCC_ChartOfAccountLabel3.ACC_ChartOfAccountLabel2ID.ToString(); txtChartOfAccountLabel3Text.Text = aCC_ChartOfAccountLabel3.ChartOfAccountLabel3Text; txtExtraField1.Text = aCC_ChartOfAccountLabel3.ExtraField1; txtExtraField2.Text = aCC_ChartOfAccountLabel3.ExtraField2; txtExtraField3.Text = aCC_ChartOfAccountLabel3.ExtraField3; txtAddedBy.Text = aCC_ChartOfAccountLabel3.AddedBy.ToString(); txtUpdatedBy.Text = aCC_ChartOfAccountLabel3.UpdatedBy.ToString(); //txtUpdatedDate.Text = aCC_ChartOfAccountLabel3.UpdatedDate; ddlRowStatus.SelectedValue = aCC_ChartOfAccountLabel3.RowStatusID.ToString(); }
public static int InsertACC_ChartOfAccountLabel3(ACC_ChartOfAccountLabel3 aCC_ChartOfAccountLabel3) { SqlACC_ChartOfAccountLabel3Provider sqlACC_ChartOfAccountLabel3Provider = new SqlACC_ChartOfAccountLabel3Provider(); return(sqlACC_ChartOfAccountLabel3Provider.InsertACC_ChartOfAccountLabel3(aCC_ChartOfAccountLabel3)); }
public bool UpdateACC_ChartOfAccountLabel3(ACC_ChartOfAccountLabel3 aCC_ChartOfAccountLabel3) { using (SqlConnection connection = new SqlConnection(this.ConnectionString)) { SqlCommand cmd = new SqlCommand("GP_UpdateACC_ChartOfAccountLabel3", connection); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add("@ACC_ChartOfAccountLabel3ID", SqlDbType.Int).Value = aCC_ChartOfAccountLabel3.ACC_ChartOfAccountLabel3ID; cmd.Parameters.Add("@Code", SqlDbType.NVarChar).Value = aCC_ChartOfAccountLabel3.Code; cmd.Parameters.Add("@ACC_ChartOfAccountLabel2ID", SqlDbType.Int).Value = aCC_ChartOfAccountLabel3.ACC_ChartOfAccountLabel2ID; cmd.Parameters.Add("@ChartOfAccountLabel3Text", SqlDbType.NVarChar).Value = aCC_ChartOfAccountLabel3.ChartOfAccountLabel3Text; cmd.Parameters.Add("@ExtraField1", SqlDbType.NVarChar).Value = aCC_ChartOfAccountLabel3.ExtraField1; cmd.Parameters.Add("@ExtraField2", SqlDbType.NVarChar).Value = aCC_ChartOfAccountLabel3.ExtraField2; cmd.Parameters.Add("@ExtraField3", SqlDbType.NVarChar).Value = aCC_ChartOfAccountLabel3.ExtraField3; cmd.Parameters.Add("@AddedBy", SqlDbType.Int).Value = aCC_ChartOfAccountLabel3.AddedBy; cmd.Parameters.Add("@AddedDate", SqlDbType.DateTime).Value = aCC_ChartOfAccountLabel3.AddedDate; cmd.Parameters.Add("@UpdatedBy", SqlDbType.Int).Value = aCC_ChartOfAccountLabel3.UpdatedBy; cmd.Parameters.Add("@UpdatedDate", SqlDbType.DateTime).Value = aCC_ChartOfAccountLabel3.UpdatedDate; cmd.Parameters.Add("@RowStatusID", SqlDbType.Int).Value = aCC_ChartOfAccountLabel3.RowStatusID; connection.Open(); int result = cmd.ExecuteNonQuery(); return result == 1; } }