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");
    }
示例#3
0
    protected void lbDelete_Click(object sender, EventArgs e)
    {
        LinkButton linkButton = new LinkButton();

        linkButton = (LinkButton)sender;
        bool result = Pos_CostTypeManager.DeletePos_CostType(Convert.ToInt32(linkButton.CommandArgument));

        showPos_CostTypeGrid();
    }
    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");
    }
示例#5
0
    private void loadPos_CostType()
    {
        ListItem li = new ListItem("Select CostType...", "0");

        ddlPos_CostType.Items.Add(li);

        List <Pos_CostType> pos_CostTypes = new List <Pos_CostType>();

        pos_CostTypes = Pos_CostTypeManager.GetAllPos_CostTypes();
        foreach (Pos_CostType pos_CostType in pos_CostTypes)
        {
            ListItem item = new ListItem(pos_CostType.CostTypeName.ToString(), pos_CostType.Pos_CostTypeID.ToString());
            ddlPos_CostType.Items.Add(item);
        }
    }
示例#6
0
 private void showPos_CostTypeGrid()
 {
     gvPos_CostType.DataSource = Pos_CostTypeManager.GetAllPos_CostTypes();
     gvPos_CostType.DataBind();
 }