Esempio n. 1
0
    protected void btnDelete_Click(object sender, EventArgs e)
    {
        try
        {
            if (Page.IsValid)
            {
                try
                {
                    BCAppAdmin appAdmin = new BCAppAdmin();
                    appAdmin.DeleteFAQ(Convert.ToInt32(hdnFAQId.Value));

                    string msg         = (string)GetLocalResourceObject("FAQDeleted");
                    string popupScript = "alert('" + msg + "');";
                    ScriptManager.RegisterStartupScript(Page, this.GetType(), "script", popupScript, true);
                    _BindFAQ();
                }
                catch (Exception ex)
                {
                    Helper.Log(ex.Message, "Delete FAQ");
                    //errorLog(ex, Server.MapPath(@"~/ImpTemp/Log.txt"));
                }
            }
        }
        catch (Exception ex)
        { }
    }
Esempio n. 2
0
 protected void btnUpdate_Click(object sender, EventArgs e)
 {
     try
     {
         if (!string.IsNullOrEmpty(txtQuestion.Text.Trim()) &&
             !string.IsNullOrEmpty(txtAnswer.Text.Trim()))
         {
             BCAppAdmin appAdmin = new BCAppAdmin();
             if (string.IsNullOrEmpty(hdnFAQId.Value))
             {
                 appAdmin.InsertFAQ(txtQuestion.Text,
                                    txtAnswer.Text, Convert.ToInt32(Session["UserId"]));
             }
             else
             {
                 appAdmin.UpdateFAQ(Convert.ToInt32(hdnFAQId.Value), txtQuestion.Text,
                                    txtAnswer.Text);
             }
             hdnFAQId.Value   = string.Empty;
             txtQuestion.Text = string.Empty;
             txtAnswer.Text   = string.Empty;
             _BindFAQ();
         }
     }
     catch (Exception)
     {}
 }
Esempio n. 3
0
 protected void btnUpdate_Click(object sender, EventArgs e)
 {
     try
     {
         if (!string.IsNullOrEmpty(txtQuestion.Text.Trim()) &&
             !string.IsNullOrEmpty(txtAnswer.Text.Trim()))
         {
             BCAppAdmin appAdmin = new BCAppAdmin();
             if (string.IsNullOrEmpty(hdnFAQId.Value))
             {
                 appAdmin.InsertFAQ(txtQuestion.Text,
                     txtAnswer.Text, Convert.ToInt32(Session["UserId"]));
             }
             else
             {
                 appAdmin.UpdateFAQ(Convert.ToInt32(hdnFAQId.Value), txtQuestion.Text,
                     txtAnswer.Text);
             }
             hdnFAQId.Value = string.Empty;
             txtQuestion.Text = string.Empty;
             txtAnswer.Text = string.Empty;
             _BindFAQ();
         }
     }
     catch (Exception)
     {}
 }
Esempio n. 4
0
    protected void btnDelete_Click(object sender, EventArgs e)
    {
        try
        {
            if (Page.IsValid)
            {
                try
                {
                    BCAppAdmin appAdmin = new BCAppAdmin();
                    appAdmin.DeleteFAQ(Convert.ToInt32(hdnFAQId.Value));

                    string msg = (string)GetLocalResourceObject("FAQDeleted");
                    string popupScript = "alert('" + msg + "');";
                    ScriptManager.RegisterStartupScript(Page, this.GetType(), "script", popupScript, true);
                    _BindFAQ();

                }
                catch (Exception ex)
                {
                    Helper.Log(ex.Message, "Delete FAQ");
                    //errorLog(ex, Server.MapPath(@"~/ImpTemp/Log.txt"));
                }
            }
        }
        catch (Exception ex)
        { }
    }
Esempio n. 5
0
 public DataTable GetCityListCityMaster(BCAppAdmin objAppAdmin)
 {
     try
     {
         _dt = DataAccessLayer.ReturnDataTable("select cityid,Cityname,CityImage,IsParticipatingCity = (case IsParticipatingCity when 1 then 'yes' else 'No' end) from  CityMaster where IsActive = 1 and CityName LIKE '%'+(CASE '" + (objAppAdmin.CityName == "" ? "0" : objAppAdmin.CityName) + "' WHEN '0' THEN Cityname ELSE '" + objAppAdmin.CityName + "' END)+'%' and IsParticipatingCity = '"
                                               + objAppAdmin.IsParticipating + "' order by Cityname");
     }
     catch { }
     return(_dt);
 }
Esempio n. 6
0
    public DataTable GetCityList(BCAppAdmin objAppAdmin)
    {
        try
        {
            _dt = DataAccessLayer.ExecuteStoredProcedureToRetDataTable(new SqlParameter[]
            {
                new SqlParameter("@CityName", (objAppAdmin.CityName == null ? " " : objAppAdmin.CityName))
            }, "SP_GET_CITYLIST");
        }
        catch (Exception ex)
        {
        }

        return(_dt);
    }
Esempio n. 7
0
    public DataTable GetAllAdminDetails(BCAppAdmin objAppAdmin)
    {
        try
        {
            _dt = DataAccessLayer.ExecuteStoredProcedureToRetDataTable(new SqlParameter[]
            {
                new SqlParameter("@AdminName", (objAppAdmin.AdminName == null ? " " : objAppAdmin.AdminName)),
                new SqlParameter("@CityId", (objAppAdmin.CityId == 0 ? 0 : objAppAdmin.CityId))
            }, "SP_GET_ALLCITY_ADMINS");
        }
        catch (Exception ex)
        {
        }

        return(_dt);
    }
Esempio n. 8
0
 public DataTable GetCityListCityMaster(BCAppAdmin objAppAdmin)
 {
     try
     {
         _dt = DataAccessLayer.ReturnDataTable("select cityid,Cityname,CityImage,IsParticipatingCity = (case IsParticipatingCity when 1 then 'yes' else 'No' end) from  CityMaster where IsActive = 1 and CityName LIKE '%'+(CASE '" + (objAppAdmin.CityName == "" ? "0" : objAppAdmin.CityName) + "' WHEN '0' THEN Cityname ELSE '" + objAppAdmin.CityName + "' END)+'%' and IsParticipatingCity = '"
             + objAppAdmin.IsParticipating + "' order by Cityname");
     }
     catch { }
     return _dt;
 }
Esempio n. 9
0
    public DataTable GetCityList(BCAppAdmin objAppAdmin)
    {
        try
        {
            _dt = DataAccessLayer.ExecuteStoredProcedureToRetDataTable(new SqlParameter[]
            {
                new SqlParameter("@CityName", (objAppAdmin.CityName == null ? " " : objAppAdmin.CityName ))
            }, "SP_GET_CITYLIST");
        }
        catch (Exception ex)
        {
        }

        return _dt;
    }
Esempio n. 10
0
    public DataTable GetAllAdminDetails(BCAppAdmin objAppAdmin)
    {
        try
        {
            _dt = DataAccessLayer.ExecuteStoredProcedureToRetDataTable(new SqlParameter[]
            {
                new SqlParameter("@AdminName", (objAppAdmin.AdminName == null ? " " : objAppAdmin.AdminName )),
                new SqlParameter("@CityId", (objAppAdmin.CityId == 0 ? 0 : objAppAdmin.CityId))

            }, "SP_GET_ALLCITY_ADMINS");
        }
        catch (Exception ex)
        {
        }

        return _dt;
    }