Пример #1
0
    public void ReportGrid(string RepCondition)
    {
        try
        {
            Ds = new DataSet();
            DMEmployeeMaster obj_DMCustomerMaster = new DMEmployeeMaster();
            Ds = obj_Emp.GetEmployee(RepCondition, out StrError);
            if (Ds.Tables.Count > 0 && Ds.Tables[0].Rows.Count > 0)
            {
                ViewState["CurrentTable1"] = Ds.Tables[0];
                GrdReport.DataSource       = Ds.Tables[0];
                GrdReport.DataBind();
                if (Ds.Tables[1].Rows.Count > 0)
                {
                    ViewState["EmpCode"] = Ds.Tables[1].Rows[0][0].ToString();
                    txtEmpCode.Text      = ViewState["EmpCode"].ToString();
                }

                //rptPages.Visible = false;
            }
            else
            {
                GrdReport.DataSource = null;
                GrdReport.DataBind();
            }
            // obj_DMCustomerMaster = null;
            Ds = null;
        }
        catch (Exception ex)
        {
            obj_Comman.ShowPopUpMsg(ex.Message, this.Page);
        }
    }
Пример #2
0
    public static string[] GetCompletionList(string prefixText, int count, string contextKey)
    {
        DMEmployeeMaster obj_Emp = new DMEmployeeMaster();

        String[] SearchList = obj_Emp.GetSuggestedRecord(prefixText);
        return(SearchList);
    }
Пример #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_Emp.GetEmployeeForEdit(Convert.ToInt32(e.CommandArgument), out StrError);
                    if (Ds.Tables.Count > 0 && Ds.Tables[0].Rows.Count > 0)
                    {
                        txtEmpCode.Text     = Ds.Tables[0].Rows[0]["EmpCode"].ToString();
                        txtEmpName.Text     = Ds.Tables[0].Rows[0]["Empname"].ToString();
                        TxtAddress.Text     = Ds.Tables[0].Rows[0]["EmpAddress"].ToString();
                        TxtTel1.Text        = Ds.Tables[0].Rows[0]["tel1"].ToString();
                        TxtTel2.Text        = Ds.Tables[0].Rows[0]["tel2"].ToString();
                        TxtMobile.Text      = Ds.Tables[0].Rows[0]["mobile"].ToString();
                        txtDOB.Text         = Ds.Tables[0].Rows[0]["dob"].ToString();
                        txtDOJ.Text         = Ds.Tables[0].Rows[0]["Employedon"].ToString();
                        TxtEmail.Text       = Ds.Tables[0].Rows[0]["Email"].ToString();
                        TxtCity.Text        = Ds.Tables[0].Rows[0]["city"].ToString();
                        TxtState.Text       = Ds.Tables[0].Rows[0]["state"].ToString();
                        TxtPinCode.Text     = Ds.Tables[0].Rows[0]["pin"].ToString();
                        TxtNotes.Text       = Ds.Tables[0].Rows[0]["Notes"].ToString();
                        hdnFldUsedCnt.Value = Ds.Tables[0].Rows[0]["UsedCount"].ToString();
                    }
                    else
                    {
                        MakeEmptyForm();
                    }
                    Ds              = null;
                    obj_Emp         = null;
                    BtnSave.Visible = false;
                    if (!FlagEdit)
                    {
                        BtnUpdate.Visible = true;
                    }
                    if (!FlagDel)
                    {
                        BtnDelete.Visible = true;
                    }
                }

                break;
            }
            }
        }
        catch (Exception ex)
        {
            throw new Exception(ex.Message);
        }
    }