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

        String[] SearchList = Obj_SupplierMaster.GetSuggestRecord(prefixText);
        return(SearchList);
    }
Exemplo n.º 2
0
    protected void BtnDelete_Click(object sender, EventArgs e)
    {
        try
        {
            int DeleteId = 0;
            if (ViewState["EditID"] != null)
            {
                DeleteId = Convert.ToInt32(ViewState["EditID"]);
            }
            if (DeleteId != 0)
            {
                Entity_TermsConditionMaster.TermsID   = DeleteId;
                Entity_TermsConditionMaster.UserId    = Convert.ToInt32(Session["UserID"]);
                Entity_TermsConditionMaster.LoginDate = DateTime.Now;

                int iDelete = Obj_TermsConditionMaster.DeleteRecord(ref Entity_TermsConditionMaster, out StrError);
                if (iDelete != 0)
                {
                    obj_Comman.ShowPopUpMsg("Record Deleted Successfully..!", this.Page);
                    MakeEmptyForm();
                }
            }
            Entity_TermsConditionMaster = null;
            Obj_TermsConditionMaster    = null;
        }
        catch (Exception ex) { throw new Exception(ex.Message); }
    }
Exemplo n.º 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_TermsConditionMaster.GetTermsForEdit(Convert.ToInt32(e.CommandArgument), out StrError);
                 if (Ds.Tables.Count > 0 && Ds.Tables[0].Rows.Count > 0)
                 {
                     TxtTitle.Text       = Ds.Tables[0].Rows[0]["Title"].ToString();
                     TxtDescription.Text = Ds.Tables[0].Rows[0]["TermsCondition"].ToString();
                 }
                 else
                 {
                     MakeEmptyForm();
                 }
                 Ds = null;
                 Obj_TermsConditionMaster = null;
                 if (!FlagEdit)
                 {
                     BtnUpdate.Visible = true;
                 }
                 BtnSave.Visible = false;
                 if (!FlagDel)
                 {
                     BtnDelete.Visible = true;
                 }
             }
             break;
         }
         }
     }
     catch (Exception ex) { throw new Exception(ex.Message); }
 }
Exemplo n.º 4
0
 private void ReportGrid(string StrCondition)
 {
     try
     {
         Ds = Obj_TermsConditionMaster.GetTerms(StrCondition, 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_TermsConditionMaster = null;
         Ds = null;
     }
     catch (Exception ex)
     {
         throw new Exception(ex.Message);
     }
 }