Пример #1
0
 /// <summary>
 /// 通過頁面編輯上架版本
 /// </summary>
 /// <returns></returns>
 public HttpResponseBase EditAppversionsInfo()
 {
     string json = string.Empty;
     try
     {
         _iappversionsMgr = new AppversionsMgr(mySqlConnectionString);
         //獲得頁面SaveReport方法提交的參數
         AppversionsQuery asq = new AppversionsQuery();
         if (!string.IsNullOrEmpty(Request.Params["txtid"]))
         {
             asq.id = Convert.ToInt32(Request.Params["txtid"].ToString());
         }
         asq.drive = Convert.ToInt32(Request.Params["cmbdriverEdit"].ToString());
         asq.versions_code = Convert.ToInt32(Request.Params["txtversions_code"].ToString());
         asq.versions_desc = Request.Params["txtversions_desc"].ToString();
         asq.versions_id = Convert.ToInt32(Request.Params["txtversions_id"].ToString());
         asq.versions_name = Request.Params["txtversions_name"].ToString();
         asq.release_type = Convert.ToInt32(Request.Params["status_type"]);
         string releasedateQuerytime = Request.Params["daterelease_date"].ToString();
         if (!string.IsNullOrEmpty(releasedateQuerytime))
         {
             asq.release_date = Convert.ToInt32(CommonFunction.GetPHPTime(releasedateQuerytime));
         }
         //調用編輯事件
         json = _iappversionsMgr.EditAppversionsInfo(asq);
     }
     catch (Exception ex)
     {
         Log4NetCustom.LogMessage logMessage = new Log4NetCustom.LogMessage();
         logMessage.Content = string.Format("TargetSite:{0},Source:{1},Message:{2}", ex.TargetSite.Name, ex.Source, ex.Message);
         logMessage.MethodName = System.Reflection.MethodBase.GetCurrentMethod().Name;
         log.Error(logMessage);
         json = "{success:false}";
     }
     return BackAjaxData(json);
 }
Пример #2
0
 public int EditAppversions(AppversionsQuery appsions)
 {
     StringBuilder str = new StringBuilder();
     try
     {
         appsions.Replace4MySQL();
         str.AppendFormat(@"update appversions set versions_id='{0}',versions_code='{1}',versions_name='{2}', versions_desc='{3}',drive='{4}',release_date='{5}',release_type='{6}' where id='{7}';"
             ,appsions.versions_id,appsions.versions_code,appsions.versions_name,appsions.versions_desc,appsions.drive,appsions.release_date,appsions.release_type,appsions.id); 
         return _access.execCommand(str.ToString());
     }
     catch (Exception ex)
     {
         throw new Exception("AppversionsDao-->EditAppversions" + ex.Message + str.ToString(), ex);
     }
 }
Пример #3
0
 /// <summary>
 /// 通過條件得到上架版本列表
 /// </summary>
 /// <returns></returns>
 public HttpResponseBase GetAppversionsInfo()
 {
     string json = string.Empty;
     AppversionsQuery asq = new AppversionsQuery();
     try
     {
         _iappversionsMgr = new AppversionsMgr(mySqlConnectionString);
         asq.Start = Convert.ToInt32(Request.Params["start"] ?? "0");
         asq.Limit = Convert.ToInt32(Request.Params["limit"] ?? "25");
         string cmbdriver = Request.Params["cmbdriver"].ToString();
         if (!string.IsNullOrEmpty(cmbdriver))
         {
             asq.drive = Convert.ToInt32(cmbdriver);
         }
         //調用查詢事件
         json = _iappversionsMgr.GetAppversionsList(asq);
     }
     catch (Exception ex)
     {
         Log4NetCustom.LogMessage logMessage = new Log4NetCustom.LogMessage();
         logMessage.Content = string.Format("TargetSite:{0},Source:{1},Message:{2}", ex.TargetSite.Name, ex.Source, ex.Message);
         logMessage.MethodName = System.Reflection.MethodBase.GetCurrentMethod().Name;
         log.Error(logMessage);
         json = "";
     }
     return BackAjaxData(json);
 }