Пример #1
0
    public static string[] GetCompletionList(string prefixText, int count, string contextKey)
    {
        DMExpensePartyMaster Obj_Expense = new DMExpensePartyMaster();

        string[] SearchList = Obj_Expense.GetSuggestRecord(prefixText);
        return(SearchList);
    }
Пример #2
0
    protected void GrdReport_ItemCommand(object source, RepeaterCommandEventArgs e)
    {
        try
        {
            switch (e.CommandName)
            {
            case ("Select"):
            {
                if (Convert.ToInt32(e.CommandArgument) != 0)
                {
                    ViewState["EditID"] = Convert.ToInt32(e.CommandArgument);
                    LinkButton lnk = (LinkButton)e.Item.FindControl("lbtn_List");
                    Label      lbl = (Label)e.Item.FindControl("lblUsedCnt");
                    if (lnk != null)
                    {
                        hdnFldUsedCnt.Value = lbl.Text;
                    }
                    DS = Obj_Expense.GetExpenceHeadToEdit(Convert.ToInt32(e.CommandArgument), out StrError);
                    if (DS.Tables.Count > 0 && DS.Tables[0].Rows.Count > 0)
                    {
                        txtExpense.Text = DS.Tables[0].Rows[0]["ExpenseParty"].ToString();
                        ddlExpenseHead.SelectedValue = Convert.ToString(DS.Tables[0].Rows[0]["ExpenseHdId"]);
                        txtNarration.Text            = DS.Tables[0].Rows[0]["Narration"].ToString();
                    }
                    else
                    {
                        MakeEmptyForm();
                    }
                    DS              = null;
                    Obj_Expense     = null;
                    BtnSave.Visible = false;
                    if (!FlagEdit)
                    {
                        BtnUpdate.Visible = true;
                    }
                    if (!FlagDel)
                    {
                        BtnDelete.Visible = true;
                    }
                    txtExpense.Focus();
                }

                break;
            }
            }
        }
        catch (Exception ex)
        {
            throw new Exception(ex.Message);
        }
    }
Пример #3
0
    private void ReportGrid(string RepCondition)
    {
        try
        {
            DS = Obj_Expense.GetExpensePartyList(RepCondition, out StrError);

            if (DS.Tables.Count > 0 && DS.Tables[0].Rows.Count > 0)
            {
                GrdReport.DataSource = DS;
                GrdReport.DataBind();
            }
            else
            {
                GrdReport.DataSource = null;
                GrdReport.DataBind();
            }
            Obj_Expense = null;
            DS          = null;
        }
        catch (Exception ex)
        {
            throw new Exception(ex.Message);
        }
    }