Example #1
0
    public static string[] GetCompletionList(string prefixText, int count, string contextKey)
    {
        DMEmployee Obj_EM = new DMEmployee();

        string[] SearchList = Obj_EM.GetSuggestRecord(prefixText);
        return(SearchList);
    }
Example #2
0
    public void ReportGrid(string RepCondition)
    {
        try
        {
            DS = Obj_EM.GeteEmployee(RepCondition, out StrError);

            if (DS.Tables.Count > 0 && DS.Tables[0].Rows.Count > 0)
            {
                GrdReport.DataSource = DS.Tables[0];
                GrdReport.DataBind();
            }
            else
            {
                GrdReport.DataSource = null;
                GrdReport.DataBind();
            }
            Obj_EM = null;
            DS     = null;
        }

        catch (Exception ex)
        {
            throw new Exception(ex.Message);
        }
    }
Example #3
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);
                    DS = Obj_EM.GetEmployeeForEdit(Convert.ToInt32(e.CommandArgument), out StrError);

                    if (DS.Tables.Count > 0 && DS.Tables[0].Rows.Count > 0)
                    {
                        TxtEmpName.Text    = DS.Tables[0].Rows[0]["EmpName"].ToString();
                        TxtEmpAddress.Text = DS.Tables[0].Rows[0]["Address"].ToString();
                        TxtTelNo.Text      = DS.Tables[0].Rows[0]["TelNo"].ToString();
                        TxtMobileNo.Text   = DS.Tables[0].Rows[0]["MobileNo"].ToString();
                        TxtEmail.Text      = DS.Tables[0].Rows[0]["Email"].ToString();
                        TxtNotes.Text      = DS.Tables[0].Rows[0]["Note"].ToString();
                        //txtDepartment.Text = DS.Tables[0].Rows[0]["Department"].ToString();
                        //txtDesignation.Text = DS.Tables[0].Rows[0]["Designation"].ToString();
                    }
                    else
                    {
                        MakeEmptyForm();
                    }
                    DS     = null;
                    Obj_EM = null;
                    if (!FlagEdit)
                    {
                        BtnUpdate.Visible = true;
                    }
                    BtnSave.Visible = false;
                    if (!FladDel)
                    {
                        BtnDelete.Visible = true;
                    }
                    TxtEmpName.Focus();
                }
                break;
            }
            }
        }
        catch (Exception ex)
        {
            StrError = ex.Message;
        }
    }