Пример #1
0
 public bool UpdatePreviewHTML(string HTML, string CDID, string PDID)
 {
     try
     {
         DatabaseHandler oDBH = new DatabaseHandler();
         oDBH.ExecuteNonQuery("UpdatePreviewHTML", CDID, HTML, PDID);
         return true;
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Пример #2
0
        //DONE
        public AppConfiguration GetAvailableConfig(string CDID)
        {
            try
            {
                DatabaseHandler oDBH = new DatabaseHandler();
                DataSet dsFinalHTML = new DataSet();
                AppConfiguration _oAppConfig = new AppConfiguration();

                dsFinalHTML = oDBH.FillData_SP("GetAvailableConfig");
                if (dsFinalHTML.Tables.Count > 0)
                {
                    if (dsFinalHTML.Tables[0].Rows.Count > 0)
                    {
                        _oAppConfig.AppCustomerDID = CDID;
                        _oAppConfig.AppID = dsFinalHTML.Tables[0].Rows[0]["AppID"].ToString();
                        objCommon.SendErrorMail(Convert.ToString(_oAppConfig.AppID), "DALC", "", "", "");
                        _oAppConfig.AppKey = dsFinalHTML.Tables[0].Rows[0]["AppKey"].ToString();
                        _oAppConfig.AppSecretKey = dsFinalHTML.Tables[0].Rows[0]["AppSecretKey"].ToString();
                        _oAppConfig.AppPath = dsFinalHTML.Tables[0].Rows[0]["AppName"].ToString();
                        _oAppConfig.AppName = dsFinalHTML.Tables[0].Rows[0]["AppType"].ToString();
                        //_oAppConfig.DID = new AppConfiguration().GetNewDIDWithPrefix();
                    }
                    //Now Update this row status to IA

                    string sqlQueryUpdate = "update [AppConfigRefrence] set AppConfigStatus='IA' where RowID=" + dsFinalHTML.Tables[0].Rows[0]["RowID"].ToString();
                    if (oDBH.ExecuteNonQuery(sqlQueryUpdate) > 0) return _oAppConfig; else return _oAppConfig;
                }
                else
                {
                    return null;
                }
            }
            catch (Exception ex)
            {
                CommonUtility commUtil = new CommonUtility();
                commUtil.SendErrorMail(ex.Message, ex.StackTrace, System.Reflection.MethodBase.GetCurrentMethod().Name.ToString(), System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.ToString(), SessionData.Customer.CustomerID);
            }
            return null;
        }
Пример #3
0
        public bool InsertFinalHTML(AppProduct oAppProduct)
        {
            try
            {
                DatabaseHandler oDBH = new DatabaseHandler();
                if (oDBH.ExecuteNonQuery_SP("InsertFinalHTML", oAppProduct.AppConfigDID, oAppProduct.ProductHTML, oAppProduct.DID) > 0)
                {

                    DatabaseHandler oDBHProd = new DatabaseHandler();
                    StringBuilder oSBQueryPRod = new StringBuilder();
                    oSBQueryPRod.Append("Update [AppProduct] set PRoductHTML='" + oAppProduct.ProductHTML + "'");
                    oSBQueryPRod.Append("where DID='" + oAppProduct.DID + "'");
                    if (oDBHProd.ExecuteNonQuery(oSBQueryPRod.ToString()) > 0) return true; else return false;
                }
                //Now insert this FetchFinalHTML to AppProduct too!
                return true;
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }