Esempio n. 1
0
    public static string[] GetCompletionList(string prefixText, int count, string contextKey)
    {
        DMSubUnit Obj_SU = new DMSubUnit();

        string[] SearchList = Obj_SU.GetSuggestRecord(prefixText);
        return(SearchList);
    }
Esempio n. 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);
                 DS = Obj_SU.GetUnitForEdit(Convert.ToInt32(e.CommandArgument), out StrError);
                 if (DS.Tables.Count > 0 && DS.Tables[0].Rows.Count > 0)
                 {
                     TxtSubUnit.Text        = DS.Tables[0].Rows[0]["SubUnit"].ToString();
                     ddlUnit.SelectedValue  = DS.Tables[0].Rows[0]["UnitId"].ToString();
                     ddlUnit.Enabled        = false;
                     TxtConversnFactor.Text = DS.Tables[0].Rows[0]["ConversionFactor"].ToString();
                 }
                 else
                 {
                     MakeEmptyForm();
                 }
                 DS     = null;
                 Obj_SU = null;
                 if (!FlagEdit)
                 {
                     BtnUpdate.Visible = true;
                 }
                 BtnSave.Visible = false;
                 if (!FlagDel)
                 {
                     BtnDelete.Visible = true;
                 }
                 TxtSubUnit.Focus();
             }
             break;
         }
         }
     }
     catch (Exception ex)
     {
         throw new Exception(ex.Message);
     }
 }
Esempio n. 3
0
 private void ReportGrid(string RepCondition)
 {
     try
     {
         DS = Obj_SU.GetSubUnit(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_SU = null;
         DS     = null;
     }
     catch (Exception ex)
     {
         throw new Exception(ex.Message);
     }
 }