Ejemplo n.º 1
0
    protected void GvExpenseList_RowDeleting(object sender, GridViewDeleteEventArgs e)
    {
        int intExpensecategory = Convert.ToInt32(GvExpenseList.DataKeys[e.RowIndex].Value);

        CExpensecategory ObjExpensecategoryId = new CExpensecategory(intExpensecategory);

        if (ObjExpensecategoryId.IsExit == true)
        {
            TxtExpenseCategoryId.Text   = ObjExpensecategoryId.ExpensecategoryId.ToString();
            TxtExpensecategoryname.Text = ObjExpensecategoryId.Expensecategoryname.ToString();
        }

        int intReturnValue = CExpensecategoryMasterServices.ExpenseCategoryMasterDelete(Convert.ToInt32(TxtExpenseCategoryId.Text));

        if (intReturnValue > 0)
        {
            Lblmsg.Text = "Expense Category Delete...";
            BindExpenseCategoryList();
            TxtExpenseCategoryId.Text   = "";
            TxtExpensecategoryname.Text = "";
        }
        else
        {
            Lblmsg.Text = "Error occured while Delete Expense Category...";
        }
    }
Ejemplo n.º 2
0
    public void BindExpenseCategoryList()
    {
        DataSet dsExpenseCategoryMasterList = CExpensecategoryMasterServices.ExpenseCategoryMasterList();

        GvExpenseList.DataSource = dsExpenseCategoryMasterList;
        GvExpenseList.DataBind();
    }
Ejemplo n.º 3
0
    public void BindExpensecategoryname()
    {
        DataSet dsExpenseCategoryMasterList = CExpensecategoryMasterServices.ExpenseCategoryMasterList();

        DropExpensecategoryList.DataSource = dsExpenseCategoryMasterList;
        DropExpensecategoryList.Items.Clear();
        DropExpensecategoryList.DataTextField  = "Expensecategoryname";
        DropExpensecategoryList.DataValueField = "ExpensecategoryId";
        DropExpensecategoryList.DataBind();
    }
Ejemplo n.º 4
0
    protected void Update_Click(object sender, EventArgs e)
    {
        int intReturnValues = CExpensecategoryMasterServices.ExpenseCategoryMasterUpDate(Convert.ToInt32(TxtExpenseCategoryId.Text), TxtExpensecategoryname.Text);

        if (intReturnValues > 0)
        {
            Lblmsg.Text = "Expense Category UpDate";
            BindExpenseCategoryList();
            TxtExpenseCategoryId.Text   = "";
            TxtExpensecategoryname.Text = "";
        }
        else
        {
            Lblmsg.Text = "Error occured while Update Expense Category.";
        }
    }
Ejemplo n.º 5
0
    protected void ButInsert_Click(object sender, EventArgs e)
    {
        int intReturnValues = CExpensecategoryMasterServices.ExpenseCategoryMasterInsert(TxtExpensecategoryname.Text);

        if (intReturnValues > 0)
        {
            Lblmsg.Text = "Expense Category Insert";
            BindExpenseCategoryList();
            TxtExpenseCategoryId.Text   = "";
            TxtExpensecategoryname.Text = "";
        }
        else
        {
            Lblmsg.Text = "Error occured while insering Expense Category.";
        }
    }