Exemplo n.º 1
0
    public static string[] GetCompletionList(string prefixText, int count, string contextKey)
    {
        DMCostCentre Obj_SL = new DMCostCentre();

        string[] SearchList = Obj_SL.GetSuggestRecord(prefixText);
        return(SearchList);
    }
Exemplo 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_SL.GetStockLOcationForEdit(Convert.ToInt32(e.CommandArgument), out StrError);
                    if (DS.Tables.Count > 0 && DS.Tables[0].Rows.Count > 0)
                    {
                        TxtCostCentre.Text     = DS.Tables[0].Rows[0]["Location"].ToString();
                        ddlSite.SelectedValue  = DS.Tables[0].Rows[0]["SiteId"].ToString();
                        ddlTower.SelectedValue = DS.Tables[0].Rows[0]["TowerId"].ToString();
                    }
                    else
                    {
                        MakeEmptyForm();
                    }
                    DS     = null;
                    Obj_SL = null;
                    if (!FlagEdit)
                    {
                        BtnUpdate.Visible = true;
                    }
                    BtnSave.Visible = false;
                    if (!FladDel)
                    {
                        BtnDelete.Visible = true;
                    }
                    TxtCostCentre.Focus();
                }

                break;
            }
            }
        }
        catch (Exception ex)
        {
            throw new Exception(ex.Message);
        }
    }
Exemplo n.º 3
0
 public void ReportGrid(string RepCondition)
 {
     try
     {
         DS = Obj_SL.GetStockLocation(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_SL = null;
         DS     = null;
     }
     catch (Exception ex)
     {
         throw new Exception(ex.Message);
     }
 }