public static Pos_CostType GetPos_CostTypeByID(int id) { Pos_CostType pos_CostType = new Pos_CostType(); SqlPos_CostTypeProvider sqlPos_CostTypeProvider = new SqlPos_CostTypeProvider(); pos_CostType = sqlPos_CostTypeProvider.GetPos_CostTypeByID(id); return pos_CostType; }
private void showPos_CostTypeData() { Pos_CostType pos_CostType = new Pos_CostType(); pos_CostType = Pos_CostTypeManager.GetPos_CostTypeByID(Int32.Parse(Request.QueryString["pos_CostTypeID"])); txtCostTypeName.Text = pos_CostType.CostTypeName; }
protected void btnAdd_Click(object sender, EventArgs e) { Pos_CostType pos_CostType = new Pos_CostType(); pos_CostType.CostTypeName = txtCostTypeName.Text; int resutl = Pos_CostTypeManager.InsertPos_CostType(pos_CostType); Response.Redirect("AdminPos_CostTypeDisplay.aspx"); }
protected void btnUpdate_Click(object sender, EventArgs e) { Pos_CostType pos_CostType = new Pos_CostType(); pos_CostType = Pos_CostTypeManager.GetPos_CostTypeByID(Int32.Parse(Request.QueryString["pos_CostTypeID"])); Pos_CostType tempPos_CostType = new Pos_CostType(); tempPos_CostType.Pos_CostTypeID = pos_CostType.Pos_CostTypeID; tempPos_CostType.CostTypeName = txtCostTypeName.Text; bool result = Pos_CostTypeManager.UpdatePos_CostType(tempPos_CostType); Response.Redirect("AdminPos_CostTypeDisplay.aspx"); }
public static bool UpdatePos_CostType(Pos_CostType pos_CostType) { SqlPos_CostTypeProvider sqlPos_CostTypeProvider = new SqlPos_CostTypeProvider(); return sqlPos_CostTypeProvider.UpdatePos_CostType(pos_CostType); }
public static int InsertPos_CostType(Pos_CostType pos_CostType) { SqlPos_CostTypeProvider sqlPos_CostTypeProvider = new SqlPos_CostTypeProvider(); return sqlPos_CostTypeProvider.InsertPos_CostType(pos_CostType); }