Exemplo n.º 1
0
        public void tbGridCustomColumn_TextChanged(object sender, EventArgs e)
        {
            string strAccountCode = ((GridView)((TextBox)sender).Parent.Parent.Parent.Parent).DataKeys[((GridViewRow)((TextBox)sender).Parent.Parent).RowIndex][0].ToString();

            //BudgetMenguru newBudgetMenguru = new BudgetMenguru();
            //newBudgetMenguru.AccountCode = strAccountCode;
            //newBudgetMenguru.PeriodMengurusID = LocalPeriodMenguruID;
            //newBudgetMenguru.Amount = Convert.ToDecimal(((TextBox)sender).Text.Trim());
            //newBudgetMenguru.Status = "A";
            //new BudgetMengurusBAL().UpdateBudgetMengurus(newBudgetMenguru);

            CustomEvenArgs eventargs = new CustomEvenArgs();

            eventargs.Code     = strAccountCode;
            eventargs.PeriodID = LocalPeriodID;

            string  stramnt = ((TextBox)sender).Text.Trim().Replace(",", "");
            decimal d       = 0;
            bool    flag    = decimal.TryParse(stramnt, out d);

            eventargs.Amount = (flag) ? d : 0;
            //eventargs.Amount = (stramnt == string.Empty) ? 0 : Convert.ToDecimal(stramnt);

            this.OnCustomTextChanged(sender, eventargs);
        }
Exemplo n.º 2
0
        public void btnstatus_Click(object sender, EventArgs e)
        {
            string         strAccountCode = ((GridView)((LinkButton)sender).Parent.Parent.Parent.Parent).DataKeys[((GridViewRow)((LinkButton)sender).Parent.Parent).RowIndex][0].ToString();
            CustomEvenArgs eventargs      = new CustomEvenArgs();

            eventargs.Code     = strAccountCode;
            eventargs.PeriodID = LocalPeriodID;
            eventargs.Period   = LocalColumnName;

            this.OnCustomStatusClicked(sender, eventargs);
        }
Exemplo n.º 3
0
        public void btnDecision_Click(object sender, EventArgs e)
        {
            string strAccountCode = ((GridView)((LinkButton)sender).Parent.Parent.Parent.Parent).DataKeys[((GridViewRow)((LinkButton)sender).Parent.Parent).RowIndex][0].ToString();
            //string strPeriod = ((GridView)((Button)sender).Parent.Parent.Parent.Parent).HeaderRow.Cells[((GridViewRow)((Button)sender).Parent.Parent).RowIndex].Text;

            CustomEvenArgs eventargs = new CustomEvenArgs();

            eventargs.Code     = strAccountCode;
            eventargs.PeriodID = LocalPeriodID;
            eventargs.Period   = LocalColumnName;
            eventargs.Amount   = Convert.ToDecimal(((TextBox)((LinkButton)sender).Parent.FindControl("tb_" + LocalPeriodID.ToString())).Text.Trim());

            this.OnCustomClicked(sender, eventargs);
        }