public ACC_ChartOfAccountLabel2 GetACC_ChartOfAccountLabel2FromReader(IDataReader reader) { try { ACC_ChartOfAccountLabel2 aCC_ChartOfAccountLabel2 = new ACC_ChartOfAccountLabel2 ( (int)reader["ACC_ChartOfAccountLabel2ID"], reader["Code"].ToString(), (int)reader["ACC_ChartOfAccountLabel1ID"], reader["ChartOfAccountLabel2Text"].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_ChartOfAccountLabel2; } catch(Exception ex) { return null; } }
protected void btnUpdate_Click(object sender, EventArgs e) { ACC_ChartOfAccountLabel2 aCC_ChartOfAccountLabel2 = new ACC_ChartOfAccountLabel2(); aCC_ChartOfAccountLabel2 = ACC_ChartOfAccountLabel2Manager.GetACC_ChartOfAccountLabel2ByID(Int32.Parse(hfaCC_ChartOfAccountLabel2ID.Value)); ACC_ChartOfAccountLabel2 tempACC_ChartOfAccountLabel2 = new ACC_ChartOfAccountLabel2(); tempACC_ChartOfAccountLabel2.ACC_ChartOfAccountLabel2ID = aCC_ChartOfAccountLabel2.ACC_ChartOfAccountLabel2ID; tempACC_ChartOfAccountLabel2.Code = txtCode.Text; tempACC_ChartOfAccountLabel2.ACC_ChartOfAccountLabel1ID = Int32.Parse(ddlACC_ChartOfAccountLabel1.SelectedValue); tempACC_ChartOfAccountLabel2.ChartOfAccountLabel2Text = txtChartOfAccountLabel2Text.Text; tempACC_ChartOfAccountLabel2.ExtraField1 = txtExtraField1.Text; tempACC_ChartOfAccountLabel2.ExtraField2 = txtExtraField2.Text; tempACC_ChartOfAccountLabel2.ExtraField3 = txtExtraField3.Text; tempACC_ChartOfAccountLabel2.AddedBy = getLogin().LoginID; tempACC_ChartOfAccountLabel2.AddedDate = DateTime.Now; tempACC_ChartOfAccountLabel2.UpdatedBy = getLogin().LoginID; tempACC_ChartOfAccountLabel2.UpdatedDate = DateTime.Now; tempACC_ChartOfAccountLabel2.RowStatusID = Int32.Parse(ddlRowStatus.SelectedValue); bool result = ACC_ChartOfAccountLabel2Manager.UpdateACC_ChartOfAccountLabel2(tempACC_ChartOfAccountLabel2); showACC_ChartOfAccountLabel2Grid(); btnUpdate.Visible = false; btnAdd.Visible = true; btnClear_Click(this, new EventArgs()); }
public ACC_ChartOfAccountLabel2 GetACC_ChartOfAccountLabel2FromReader(IDataReader reader) { try { ACC_ChartOfAccountLabel2 aCC_ChartOfAccountLabel2 = new ACC_ChartOfAccountLabel2 ( (int)reader["ACC_ChartOfAccountLabel2ID"], reader["Code"].ToString(), (int)reader["ACC_ChartOfAccountLabel1ID"], reader["ChartOfAccountLabel2Text"].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_ChartOfAccountLabel2); } catch (Exception ex) { return(null); } }
public static ACC_ChartOfAccountLabel2 GetACC_ChartOfAccountLabel2ByID(int id) { ACC_ChartOfAccountLabel2 aCC_ChartOfAccountLabel2 = new ACC_ChartOfAccountLabel2(); SqlACC_ChartOfAccountLabel2Provider sqlACC_ChartOfAccountLabel2Provider = new SqlACC_ChartOfAccountLabel2Provider(); aCC_ChartOfAccountLabel2 = sqlACC_ChartOfAccountLabel2Provider.GetACC_ChartOfAccountLabel2ByID(id); return aCC_ChartOfAccountLabel2; }
public static ACC_ChartOfAccountLabel2 GetACC_ChartOfAccountLabel2ByID(int id) { ACC_ChartOfAccountLabel2 aCC_ChartOfAccountLabel2 = new ACC_ChartOfAccountLabel2(); SqlACC_ChartOfAccountLabel2Provider sqlACC_ChartOfAccountLabel2Provider = new SqlACC_ChartOfAccountLabel2Provider(); aCC_ChartOfAccountLabel2 = sqlACC_ChartOfAccountLabel2Provider.GetACC_ChartOfAccountLabel2ByID(id); return(aCC_ChartOfAccountLabel2); }
private void showACC_ChartOfAccountLabel2Data() { ACC_ChartOfAccountLabel2 aCC_ChartOfAccountLabel2 = new ACC_ChartOfAccountLabel2(); aCC_ChartOfAccountLabel2 = ACC_ChartOfAccountLabel2Manager.GetACC_ChartOfAccountLabel2ByID(Int32.Parse(hfaCC_ChartOfAccountLabel2ID.Value)); txtCode.Text = aCC_ChartOfAccountLabel2.Code; ddlACC_ChartOfAccountLabel1.SelectedValue = aCC_ChartOfAccountLabel2.ACC_ChartOfAccountLabel1ID.ToString(); txtChartOfAccountLabel2Text.Text = aCC_ChartOfAccountLabel2.ChartOfAccountLabel2Text; txtExtraField1.Text = aCC_ChartOfAccountLabel2.ExtraField1; txtExtraField2.Text = aCC_ChartOfAccountLabel2.ExtraField2; txtExtraField3.Text = aCC_ChartOfAccountLabel2.ExtraField3; txtAddedBy.Text = aCC_ChartOfAccountLabel2.AddedBy.ToString(); txtUpdatedBy.Text = aCC_ChartOfAccountLabel2.UpdatedBy.ToString(); //txtUpdatedDate.Text = aCC_ChartOfAccountLabel2.UpdatedDate; ddlRowStatus.SelectedValue = aCC_ChartOfAccountLabel2.RowStatusID.ToString(); }
protected void btnAdd_Click(object sender, EventArgs e) { ACC_ChartOfAccountLabel2 aCC_ChartOfAccountLabel2 = new ACC_ChartOfAccountLabel2(); aCC_ChartOfAccountLabel2.Code = txtCode.Text; aCC_ChartOfAccountLabel2.ACC_ChartOfAccountLabel1ID = Int32.Parse(ddlACC_ChartOfAccountLabel1.SelectedValue); aCC_ChartOfAccountLabel2.ChartOfAccountLabel2Text = txtChartOfAccountLabel2Text.Text; aCC_ChartOfAccountLabel2.ExtraField1 = txtExtraField1.Text; aCC_ChartOfAccountLabel2.ExtraField2 = txtExtraField2.Text; aCC_ChartOfAccountLabel2.ExtraField3 = txtExtraField3.Text; aCC_ChartOfAccountLabel2.AddedBy = getLogin().LoginID; aCC_ChartOfAccountLabel2.AddedDate = DateTime.Now; aCC_ChartOfAccountLabel2.UpdatedBy = getLogin().LoginID; aCC_ChartOfAccountLabel2.UpdatedDate = DateTime.Now; aCC_ChartOfAccountLabel2.RowStatusID = Int32.Parse(ddlRowStatus.SelectedValue); int resutl = ACC_ChartOfAccountLabel2Manager.InsertACC_ChartOfAccountLabel2(aCC_ChartOfAccountLabel2); Response.Redirect("AdminACC_ChartOfAccountLabel2Display.aspx"); }
protected void btnAdd_Click(object sender, EventArgs e) { ACC_ChartOfAccountLabel2 aCC_ChartOfAccountLabel2 = new ACC_ChartOfAccountLabel2(); aCC_ChartOfAccountLabel2.Code = txtCode.Text; aCC_ChartOfAccountLabel2.ACC_ChartOfAccountLabel1ID = Int32.Parse(ddlACC_ChartOfAccountLabel1.SelectedValue); aCC_ChartOfAccountLabel2.ChartOfAccountLabel2Text = txtChartOfAccountLabel2Text.Text; aCC_ChartOfAccountLabel2.ExtraField1 = txtExtraField1.Text; aCC_ChartOfAccountLabel2.ExtraField2 = txtExtraField2.Text; aCC_ChartOfAccountLabel2.ExtraField3 = txtExtraField3.Text; aCC_ChartOfAccountLabel2.AddedBy = getLogin().LoginID; aCC_ChartOfAccountLabel2.AddedDate = DateTime.Now; aCC_ChartOfAccountLabel2.UpdatedBy = getLogin().LoginID; aCC_ChartOfAccountLabel2.UpdatedDate = DateTime.Now; aCC_ChartOfAccountLabel2.RowStatusID = Int32.Parse(ddlRowStatus.SelectedValue); int resutl = ACC_ChartOfAccountLabel2Manager.InsertACC_ChartOfAccountLabel2(aCC_ChartOfAccountLabel2); showACC_ChartOfAccountLabel2Grid(); btnClear_Click(this, new EventArgs()); }
protected void btnUpdate_Click(object sender, EventArgs e) { ACC_ChartOfAccountLabel2 aCC_ChartOfAccountLabel2 = new ACC_ChartOfAccountLabel2(); aCC_ChartOfAccountLabel2 = ACC_ChartOfAccountLabel2Manager.GetACC_ChartOfAccountLabel2ByID(Int32.Parse(Request.QueryString["aCC_ChartOfAccountLabel2ID"])); ACC_ChartOfAccountLabel2 tempACC_ChartOfAccountLabel2 = new ACC_ChartOfAccountLabel2(); tempACC_ChartOfAccountLabel2.ACC_ChartOfAccountLabel2ID = aCC_ChartOfAccountLabel2.ACC_ChartOfAccountLabel2ID; tempACC_ChartOfAccountLabel2.Code = txtCode.Text; tempACC_ChartOfAccountLabel2.ACC_ChartOfAccountLabel1ID = Int32.Parse(ddlACC_ChartOfAccountLabel1.SelectedValue); tempACC_ChartOfAccountLabel2.ChartOfAccountLabel2Text = txtChartOfAccountLabel2Text.Text; tempACC_ChartOfAccountLabel2.ExtraField1 = txtExtraField1.Text; tempACC_ChartOfAccountLabel2.ExtraField2 = txtExtraField2.Text; tempACC_ChartOfAccountLabel2.ExtraField3 = txtExtraField3.Text; tempACC_ChartOfAccountLabel2.AddedBy = getLogin().LoginID; tempACC_ChartOfAccountLabel2.AddedDate = DateTime.Now; tempACC_ChartOfAccountLabel2.UpdatedBy = getLogin().LoginID; tempACC_ChartOfAccountLabel2.UpdatedDate = DateTime.Now; tempACC_ChartOfAccountLabel2.RowStatusID = Int32.Parse(ddlRowStatus.SelectedValue); bool result = ACC_ChartOfAccountLabel2Manager.UpdateACC_ChartOfAccountLabel2(tempACC_ChartOfAccountLabel2); Response.Redirect("AdminACC_ChartOfAccountLabel2Display.aspx"); }
public bool UpdateACC_ChartOfAccountLabel2(ACC_ChartOfAccountLabel2 aCC_ChartOfAccountLabel2) { using (SqlConnection connection = new SqlConnection(this.ConnectionString)) { SqlCommand cmd = new SqlCommand("GP_UpdateACC_ChartOfAccountLabel2", connection); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add("@ACC_ChartOfAccountLabel2ID", SqlDbType.Int).Value = aCC_ChartOfAccountLabel2.ACC_ChartOfAccountLabel2ID; cmd.Parameters.Add("@Code", SqlDbType.NVarChar).Value = aCC_ChartOfAccountLabel2.Code; cmd.Parameters.Add("@ACC_ChartOfAccountLabel1ID", SqlDbType.Int).Value = aCC_ChartOfAccountLabel2.ACC_ChartOfAccountLabel1ID; cmd.Parameters.Add("@ChartOfAccountLabel2Text", SqlDbType.NVarChar).Value = aCC_ChartOfAccountLabel2.ChartOfAccountLabel2Text; cmd.Parameters.Add("@ExtraField1", SqlDbType.NVarChar).Value = aCC_ChartOfAccountLabel2.ExtraField1; cmd.Parameters.Add("@ExtraField2", SqlDbType.NVarChar).Value = aCC_ChartOfAccountLabel2.ExtraField2; cmd.Parameters.Add("@ExtraField3", SqlDbType.NVarChar).Value = aCC_ChartOfAccountLabel2.ExtraField3; cmd.Parameters.Add("@AddedBy", SqlDbType.Int).Value = aCC_ChartOfAccountLabel2.AddedBy; cmd.Parameters.Add("@AddedDate", SqlDbType.DateTime).Value = aCC_ChartOfAccountLabel2.AddedDate; cmd.Parameters.Add("@UpdatedBy", SqlDbType.Int).Value = aCC_ChartOfAccountLabel2.UpdatedBy; cmd.Parameters.Add("@UpdatedDate", SqlDbType.DateTime).Value = aCC_ChartOfAccountLabel2.UpdatedDate; cmd.Parameters.Add("@RowStatusID", SqlDbType.Int).Value = aCC_ChartOfAccountLabel2.RowStatusID; connection.Open(); int result = cmd.ExecuteNonQuery(); return(result == 1); } }
public bool UpdateACC_ChartOfAccountLabel2(ACC_ChartOfAccountLabel2 aCC_ChartOfAccountLabel2) { using (SqlConnection connection = new SqlConnection(this.ConnectionString)) { SqlCommand cmd = new SqlCommand("GP_UpdateACC_ChartOfAccountLabel2", connection); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add("@ACC_ChartOfAccountLabel2ID", SqlDbType.Int).Value = aCC_ChartOfAccountLabel2.ACC_ChartOfAccountLabel2ID; cmd.Parameters.Add("@Code", SqlDbType.NVarChar).Value = aCC_ChartOfAccountLabel2.Code; cmd.Parameters.Add("@ACC_ChartOfAccountLabel1ID", SqlDbType.Int).Value = aCC_ChartOfAccountLabel2.ACC_ChartOfAccountLabel1ID; cmd.Parameters.Add("@ChartOfAccountLabel2Text", SqlDbType.NVarChar).Value = aCC_ChartOfAccountLabel2.ChartOfAccountLabel2Text; cmd.Parameters.Add("@ExtraField1", SqlDbType.NVarChar).Value = aCC_ChartOfAccountLabel2.ExtraField1; cmd.Parameters.Add("@ExtraField2", SqlDbType.NVarChar).Value = aCC_ChartOfAccountLabel2.ExtraField2; cmd.Parameters.Add("@ExtraField3", SqlDbType.NVarChar).Value = aCC_ChartOfAccountLabel2.ExtraField3; cmd.Parameters.Add("@AddedBy", SqlDbType.Int).Value = aCC_ChartOfAccountLabel2.AddedBy; cmd.Parameters.Add("@AddedDate", SqlDbType.DateTime).Value = aCC_ChartOfAccountLabel2.AddedDate; cmd.Parameters.Add("@UpdatedBy", SqlDbType.Int).Value = aCC_ChartOfAccountLabel2.UpdatedBy; cmd.Parameters.Add("@UpdatedDate", SqlDbType.DateTime).Value = aCC_ChartOfAccountLabel2.UpdatedDate; cmd.Parameters.Add("@RowStatusID", SqlDbType.Int).Value = aCC_ChartOfAccountLabel2.RowStatusID; connection.Open(); int result = cmd.ExecuteNonQuery(); return result == 1; } }
public static int InsertACC_ChartOfAccountLabel2(ACC_ChartOfAccountLabel2 aCC_ChartOfAccountLabel2) { SqlACC_ChartOfAccountLabel2Provider sqlACC_ChartOfAccountLabel2Provider = new SqlACC_ChartOfAccountLabel2Provider(); return sqlACC_ChartOfAccountLabel2Provider.InsertACC_ChartOfAccountLabel2(aCC_ChartOfAccountLabel2); }
private void showACC_ChartOfAccountLabel2Data() { ACC_ChartOfAccountLabel2 aCC_ChartOfAccountLabel2 = new ACC_ChartOfAccountLabel2(); aCC_ChartOfAccountLabel2 = ACC_ChartOfAccountLabel2Manager.GetACC_ChartOfAccountLabel2ByID(Int32.Parse(Request.QueryString["aCC_ChartOfAccountLabel2ID"])); txtCode.Text = aCC_ChartOfAccountLabel2.Code; ddlACC_ChartOfAccountLabel1.SelectedValue = aCC_ChartOfAccountLabel2.ACC_ChartOfAccountLabel1ID.ToString(); txtChartOfAccountLabel2Text.Text = aCC_ChartOfAccountLabel2.ChartOfAccountLabel2Text; txtExtraField1.Text = aCC_ChartOfAccountLabel2.ExtraField1; txtExtraField2.Text = aCC_ChartOfAccountLabel2.ExtraField2; txtExtraField3.Text = aCC_ChartOfAccountLabel2.ExtraField3; txtAddedBy.Text = aCC_ChartOfAccountLabel2.AddedBy.ToString(); txtUpdatedBy.Text = aCC_ChartOfAccountLabel2.UpdatedBy.ToString(); //txtUpdatedDate.Text = aCC_ChartOfAccountLabel2.UpdatedDate; ddlRowStatus.SelectedValue = aCC_ChartOfAccountLabel2.RowStatusID.ToString(); }
public static bool UpdateACC_ChartOfAccountLabel2(ACC_ChartOfAccountLabel2 aCC_ChartOfAccountLabel2) { SqlACC_ChartOfAccountLabel2Provider sqlACC_ChartOfAccountLabel2Provider = new SqlACC_ChartOfAccountLabel2Provider(); return(sqlACC_ChartOfAccountLabel2Provider.UpdateACC_ChartOfAccountLabel2(aCC_ChartOfAccountLabel2)); }
public static int InsertACC_ChartOfAccountLabel2(ACC_ChartOfAccountLabel2 aCC_ChartOfAccountLabel2) { SqlACC_ChartOfAccountLabel2Provider sqlACC_ChartOfAccountLabel2Provider = new SqlACC_ChartOfAccountLabel2Provider(); return(sqlACC_ChartOfAccountLabel2Provider.InsertACC_ChartOfAccountLabel2(aCC_ChartOfAccountLabel2)); }
public static bool UpdateACC_ChartOfAccountLabel2(ACC_ChartOfAccountLabel2 aCC_ChartOfAccountLabel2) { SqlACC_ChartOfAccountLabel2Provider sqlACC_ChartOfAccountLabel2Provider = new SqlACC_ChartOfAccountLabel2Provider(); return sqlACC_ChartOfAccountLabel2Provider.UpdateACC_ChartOfAccountLabel2(aCC_ChartOfAccountLabel2); }