protected void lbDelete_Click(object sender, EventArgs e) { LinkButton linkButton = new LinkButton(); linkButton = (LinkButton)sender; bool result = Pos_ColorManager.DeletePos_Color(Convert.ToInt32(linkButton.CommandArgument)); showPos_ColorGrid(); }
private void showPos_ColorData() { Pos_Color pos_Color = new Pos_Color(); pos_Color = Pos_ColorManager.GetPos_ColorByID(Int32.Parse(Request.QueryString["pos_ColorID"])); txtColorName.Text = pos_Color.ColorName; txtColorCode.Text = pos_Color.ColorCode; }
protected void btnAdd_Click(object sender, EventArgs e) { Pos_Color pos_Color = new Pos_Color(); pos_Color.ColorName = txtColorName.Text; pos_Color.ColorCode = txtColorCode.Text; int resutl = Pos_ColorManager.InsertPos_Color(pos_Color); Response.Redirect("AdminPos_ColorDisplay.aspx"); }
private void loadPos_Color() { ListItem li = new ListItem("Select Pos_Color...", "0"); ddlColorSearch.Items.Add(li); List <Pos_Color> pos_Colors = new List <Pos_Color>(); pos_Colors = Pos_ColorManager.GetAllPos_Colors(); foreach (Pos_Color pos_Color in pos_Colors) { ListItem item = new ListItem(pos_Color.ColorName.ToString(), pos_Color.Pos_ColorID.ToString()); ddlColorSearch.Items.Add(item); } }
protected void btnUpdate_Click(object sender, EventArgs e) { Pos_Color pos_Color = new Pos_Color(); pos_Color = Pos_ColorManager.GetPos_ColorByID(Int32.Parse(Request.QueryString["pos_ColorID"])); Pos_Color tempPos_Color = new Pos_Color(); tempPos_Color.Pos_ColorID = pos_Color.Pos_ColorID; tempPos_Color.ColorName = txtColorName.Text; tempPos_Color.ColorCode = txtColorCode.Text; bool result = Pos_ColorManager.UpdatePos_Color(tempPos_Color); Response.Redirect("AdminPos_ColorDisplay.aspx"); }
private void showPos_ColorGrid() { gvPos_Color.DataSource = Pos_ColorManager.GetAllPos_Colors(); gvPos_Color.DataBind(); }