public int Compare(object a, object b) { string x = ConvertUtility.Trim(a); string y = ConvertUtility.Trim(b); string character = "abcdefghijklmnopqrstuvwxyz"; if (!string.IsNullOrEmpty(x)) { x = x.Replace("室", string.Empty); } if (!string.IsNullOrEmpty(y)) { y = y.Replace("室", string.Empty); } int a_int = 0; int b_int = 0; if (character.IndexOf(x.ToLower()) > -1) { a_int = ConvertUtility.ToASCIICode(x.ToLower()); } else { a_int = ConvertUtility.ToInt(x); } if (character.IndexOf(y.ToLower()) > -1) { b_int = ConvertUtility.ToASCIICode(y.ToLower()); } else { b_int = ConvertUtility.ToInt(y); } return(a_int - b_int); }
public ComparedUnitType(DataRow row) { this.ComparedId = ConvertUtility.ToInt(row["ComparedId"]); this.UnitId = ConvertUtility.Trim(row["UnitId"]); this.BuildId = ConvertUtility.Trim(row["BuildId"]); this.CX_Axis = ConvertUtility.Trim(row["CX_Axis"]); this.CY_Axis = ConvertUtility.Trim(row["CY_Axis"]); this.CountF = ConvertUtility.Trim(row["CountF"]); this.CountT = ConvertUtility.Trim(row["CountT"]); this.CountW = ConvertUtility.Trim(row["CountW"]); this.CountY = ConvertUtility.Trim(row["CountY"]); this.Area = ConvertUtility.Trim(row["Area"]); this.DirectionTo = ConvertUtility.Trim(row["DirectionTo"]); this.Framework_UnitId = ConvertUtility.Trim(row["Framework_UnitId"]); this.Framework_BuildId = ConvertUtility.Trim(row["Framework_BuildId"]); this.Framework_CX_Axis = ConvertUtility.Trim(row["Framework_CX_Axis"]); this.Framework_CY_Axis = ConvertUtility.Trim(row["Framework_CY_Axis"]); this.Framework_CountF = ConvertUtility.Trim(row["Framework_CountF"]); this.Framework_CountT = ConvertUtility.Trim(row["Framework_CountT"]); this.Framework_CountW = ConvertUtility.Trim(row["Framework_CountW"]); this.Framework_CountY = ConvertUtility.Trim(row["Framework_CountY"]); this.Framework_Area = ConvertUtility.Trim(row["Framework_Area"]); this.Framework_DirectionTo = ConvertUtility.Trim(row["Framework_DirectionTo"]); this.StatusId = ConvertUtility.ToInt(row["StatusId"]); this.ComparedDate = ConvertUtility.ToDateTime(row["ComparedDate"]); }
public EstateFwType(DataRow row) { this.EstateId = ConvertUtility.Trim(row["EstateId"]); this.ScopeId = ConvertUtility.Trim(row["ScopeId"]); this.EstateName = ConvertUtility.Trim(row["EstateName"]); this.Address = ConvertUtility.Trim(row["Address"]); this.Flow = ConvertUtility.ToInt(row["FlowStatus"]); this.Operate = ConvertUtility.ToInt(row["OperateStatus"]); this.Collect_EstateId = ConvertUtility.Trim(row["Collect_EstateId"]); this.Collect_ScopeId = ConvertUtility.Trim(row["Collect_ScopeId"]); this.Collect_EstateName = ConvertUtility.Trim(row["Collect_EstateName"]); this.Collect_Address = ConvertUtility.Trim(row["Collect_Address"]); this.AgencyCom_EstateId = ConvertUtility.Trim(row["AgencyCom_EstateId"]); this.AgencyCom_ScopeId = ConvertUtility.Trim(row["AgencyCom_ScopeId"]); this.AgencyCom_EstateName = ConvertUtility.Trim(row["AgencyCom_EstateName"]); this.AgencyCom_Address = ConvertUtility.Trim(row["AgencyCom_Address"]); this.CreateBy = ConvertUtility.Trim(row["CreateBy"]); this.CreateDate = ConvertUtility.ToDateTime(row["CreateDate"]); this.ModifyBy = ConvertUtility.Trim(row["ModifyBy"]); this.ModifyDate = ConvertUtility.ToDateTime(row["ModifyDate"]); }
protected void Page_Load(object sender, EventArgs e) { try { string httpMehtod = Request.HttpMethod; UnitFwService unitService = new UnitFwService(); string unitId = ConvertUtility.Trim(Request.QueryString["id"]); if (httpMehtod.Equals("get", StringComparison.OrdinalIgnoreCase)) { this.Unit = unitService.GetUnit(unitId); } else { float area = ConvertUtility.ToFloat(Request.Form["area"]); int countf = ConvertUtility.ToInt(Request.Form["countf"]); int countt = ConvertUtility.ToInt(Request.Form["countt"]); int countw = ConvertUtility.ToInt(Request.Form["countw"]); int county = ConvertUtility.ToInt(Request.Form["county"]); string direction = ConvertUtility.Trim(Request.Form["directionTo"]); if (unitService.UpdateUnit(unitId, countf, countt, countw, county, direction, area)) { Response.Write("true"); } else { Response.Write("false"); } Response.End(); } } catch (Exception ex) { throw ex; } }
public bool DeleteUnitById(string id, string isDelete) { string funMsg = "function: DeleteEstateById(string id, string isDelete)" + FileUtility.NewLine + _ClassMsg; try { string[] unitId = id.Split(new string[] { AppSettings.FirstSplit }, StringSplitOptions.RemoveEmptyEntries); string[] delete = isDelete.Split(new string[] { AppSettings.FirstSplit }, StringSplitOptions.RemoveEmptyEntries); for (int idx = 0; idx < unitId.Length; idx++) { string item = unitId[idx]; int nmark = ConvertUtility.ToInt(Nmark.InsertUnit); if (ConvertUtility.ToBoolean(delete[idx])) { nmark = ConvertUtility.ToInt(Nmark.Delete15); } _DbService.UpdateUnitByNmark(item, nmark); } return(true); } catch (Exception ex) { string exMsg = "Exception: " + ex.Message + FileUtility.NewLine + funMsg; throw new Exception(exMsg, ex.InnerException); } }
public UnitCtType(DataRow row) { this.UnitId = ConvertUtility.Trim(row["UnitId"]); this.BuildId = ConvertUtility.Trim(row["BuildId"]); this.CX_Axis = ConvertUtility.Trim(row["CX_Axis"]); this.CY_Axis = ConvertUtility.Trim(row["CY_Axis"]); this.CountF = ConvertUtility.ToInt(row["CountF"]); this.CountT = ConvertUtility.ToInt(row["CountT"]); this.CountW = ConvertUtility.ToInt(row["CountW"]); this.CountY = ConvertUtility.ToInt(row["CountY"]); this.Area = ConvertUtility.ToFloat(row["Area"]); this.DirectionTo = ConvertUtility.Trim(row["DirectionTo"]); this.Operate = ConvertUtility.ToInt(row["OperateStatus"]); this.Flow = ConvertUtility.ToInt(row["FlowStatus"]); this.AgencyCom_UnitId = ConvertUtility.Trim(row["AgencyCom_UnitId"]); this.AgencyCom_BuildId = ConvertUtility.Trim(row["AgencyCom_BuildId"]); this.AgencyCom_CX_Axis = ConvertUtility.Trim(row["AgencyCom_CX_Axis"]); this.AgencyCom_CY_Axis = ConvertUtility.Trim(row["AgencyCom_CY_Axis"]); this.AgencyCom_CountF = ConvertUtility.ToInt(row["AgencyCom_CountF"]); this.AgencyCom_CountT = ConvertUtility.ToInt(row["AgencyCom_CountT"]); this.AgencyCom_CountW = ConvertUtility.ToInt(row["AgencyCom_CountW"]); this.AgencyCom_CountY = ConvertUtility.ToInt(row["AgencyCom_CountY"]); this.AgencyCom_Area = ConvertUtility.ToFloat(row["AgencyCom_Area"]); this.AgencyCom_DirectionTo = ConvertUtility.Trim(row["AgencyCom_DirectionTo"]); this.CreateBy = ConvertUtility.Trim(row["CreateBy"]); this.CreateDate = ConvertUtility.ToDateTime(row["CreateDate"]); this.ModifyBy = ConvertUtility.Trim(row["ModifyBy"]); this.ModifyDate = ConvertUtility.ToDateTime(row["ModifyDate"]); }
public static int GetHandlerCount() { var sql = "select count(1) from " + AppSettings.TableSearch + " where status =1 or status=-1"; var row = DbUtility.GetDataRow(sql, AppSettings.ConnStr); return(ConvertUtility.ToInt(row[0])); }
public ActionResult Add(FormCollection form, GX_RJXX gxrjxx) { try { gxrjxx.ID = new Common().GetRandom(); gxrjxx.RJBH = new Common().GetRandom().ToString(); gxrjxx.RJZT = "1"; gxrjxx.XMYSXXID = ConvertUtility.ToDecimal(form["Id"]); gxrjxx.GCBH = form["gcbh"]; gxrjxx.RJMC = form["RJMC"]; gxrjxx.GJZ = gxrjxx.GCBH + "_" + form["GCRJBH"]; gxrjxx.GCRJBH = form["GCRJBH"]; gxrjxx.JGSL = ConvertUtility.ToInt(form["JGSL"]); gxrjxx.DXLX = form["DXLX"]; gxrjxx.RSJCC = form["RSJCC"]; gxrjxx.DXLX = form["DXLX"]; gxrjxx.LONGITUDE = form["LONGITUDE"]; gxrjxx.LATITUDE = form["LATITUDE"]; gxrjxx.CREATEBY = CurrentUser.UserName; gxrjxx.CREATETIME = DateTime.Now; gxXlzxBusiness.Add(gxrjxx); return(Json(gxXlzxBusiness.SaveChange() > 0 ? AjaxResult.Success("数据操作成功!") : AjaxResult.Error("数据操作失败!"))); } catch (Exception ex) { return(Json(AjaxResult.Error("数据操作失败!"))); } }
public static int GetCount() { var sql = "select count(1) from " + AppSettings.TableSearch; var row = DbUtility.GetDataRow(sql, AppSettings.ConnStr); return(ConvertUtility.ToInt(row[0])); }
protected void Page_Load(object sender, EventArgs e) { try { EstateCmService estateService = new EstateCmService(); int recordCount; string type = ConvertUtility.Trim(Request.QueryString["type"]); string code = ConvertUtility.Trim(Request.QueryString["code"]); int pageIndex = ConvertUtility.ToInt(Request.QueryString["pageIndex"], 1); this.PageSize = AppSettings.PageSize; IList <EstateCmType> estateCollection = estateService.GetEstateByType(type, code, pageIndex, this.PageSize, out recordCount); this.RecordCount = recordCount; this.EstateCollection = new List <EstateCmType>(); foreach (var item in estateCollection) { EstateCmType estateType = item; OrderType orderType = estateService.GetOrder(item.EstateId); if (orderType != null) { estateType.IsOrder = true; estateType.OrderStatus = orderType.StatusId; if (estateType.OrderStatus == OrderStatus.COMPARED) { estateType.CompareDate = estateService.GetComparedEstate(estateType.EstateId).ComparedDate; } } this.EstateCollection.Add(estateType); } } catch (Exception ex) { throw ex; } }
protected void Page_Load(object sender, EventArgs e) { try { int recordCount; string type = ConvertUtility.Trim(Request.QueryString["type"]); string estateId = ConvertUtility.Trim(Request.QueryString["code"]); int pageIndex = ConvertUtility.ToInt(Request.QueryString["pageIndex"]); this.PageSize = AppSettings.PageSize; BuildCmService buildService = new BuildCmService(); EstateCmService estateService = new EstateCmService(); ComparedEstateType comparedEstate = estateService.GetComparedEstate(estateId); if (comparedEstate != null) { this.ComparedBuildCollection = buildService.ListComparedBuild(comparedEstate, pageIndex, this.PageSize, out recordCount); } else { this.BuildCollection = buildService.ListBuild(estateId, pageIndex, this.PageSize, out recordCount); } this.RecordCount = recordCount; } catch (Exception ex) { throw ex; } }
private void ClearLog() { try { Random rnd = new Random(); int clear = rnd.Next(-1, 9); if (clear < 0) { string logFolder = Path.Combine(HttpContext.Current.Request.PhysicalApplicationPath, AppSettings.PreviewLogFolder); if (FileUtility.IsExistDirectory(logFolder)) { int intervalDay = AppSettings.IntervalDay * -1; int end = ConvertUtility.ToInt(DateTime.Now.AddDays(intervalDay).ToString("yyyyMMdd")); string[] fileNames = FileUtility.GetFileNames(logFolder); foreach (var item in fileNames) { string filePath = Path.Combine(logFolder, item); int fileName = ConvertUtility.ToInt(FileUtility.GetFileNameNoExtension(filePath)); if (fileName < end) { FileUtility.DeleteFile(filePath); } } } } } catch (Exception ex) { throw ex; } }
public UserInfoType(DataRow row) { this.UserInfoId = ConvertUtility.Trim(row["UserInfoId"]); this.UserName = ConvertUtility.Trim(row["UserName"]); this.RoleInfoId = ConvertUtility.ToInt(row["RoleInfoId"]); this.StatusInfoId = ConvertUtility.ToInt(row["StatusInfoId"]); this.CreateDate = ConvertUtility.ToDateTime(row["CreateDate"]); }
/// <summary> /// 获取文件列表 /// </summary> /// <param name="page"></param> /// <param name="rows"></param> /// <returns></returns> public ActionResult GetFileList(int page, int rows) { int totalRecord = 0; decimal gcxmid = ConvertUtility.ToDecimal(Request["gcxmid"]); var type = ConvertUtility.ToInt(Request["type"]); var list = gxYszlfileBusiness.FindAlXlzxList(type, gcxmid, page, rows, out totalRecord); return(Json(new { total = totalRecord, rows = list })); }
public JsonResult Filter(CentaBuildType model) { int page = ConvertUtility.ToInt(Request["page"], 1); int rows = ConvertUtility.ToInt(Request["rows"], 40); var service = new BuildService(); int recordCount; var models = service.Filter(model, page, rows, out recordCount); return(Json(new { total = recordCount, rows = models })); }
public OrderType(DataRow row) { this.OrderId = ConvertUtility.ToInt(row["OrderId"]); this.EstateId = ConvertUtility.Trim(row["EstateId"]); this.StatusId = ConvertUtility.ToInt(row["StatusId"]); this.CreateBy = ConvertUtility.Trim(row["CreateBy"]); this.CreateDate = ConvertUtility.ToDateTime(row["CreateDate"]); this.CompletedBy = ConvertUtility.Trim(row["CompletedBy"]); this.CompletedDate = ConvertUtility.ToDateTime(row["CompletedDate"]); }
protected void Page_Load(object sender, EventArgs e) { try { string httpMehtod = Request.HttpMethod; UnitCtService unitService = new UnitCtService(); if (httpMehtod.Equals("get", StringComparison.OrdinalIgnoreCase)) { this.UnitId = ConvertUtility.Trim(Request.QueryString["id"]); string[] unitIdCollection = this.UnitId.Split(new string[] { AppSettings.FirstSplit }, StringSplitOptions.RemoveEmptyEntries); if (unitIdCollection != null && unitIdCollection.Length > 0) { List <string> unit = new List <string>(); BuildCtService buildService = new BuildCtService(); foreach (var item in unitIdCollection) { var centaUnit = unitService.GetUnit(""); unit.Add(centaUnit.CY_Axis + centaUnit.CX_Axis); if (string.IsNullOrEmpty(this.EstateName) && string.IsNullOrEmpty(this.BuildName)) { var build = buildService.GetBuild(centaUnit.BuildId); this.BuildName = build.BuildName; this.EstateName = build.Estate.EstateName; this.Address = build.Estate.Address; } } this.UnitCollection = string.Join(",", unit.ToArray()); } } else { string unitId = ConvertUtility.Trim(Request.Form["unitId"]); string[] unitIdCollection = unitId.Split(new string[] { AppSettings.FirstSplit }, StringSplitOptions.RemoveEmptyEntries); decimal area = ConvertUtility.ToDecimal(Request.Form["area"]); int countf = ConvertUtility.ToInt(Request.Form["countf"]); int countt = ConvertUtility.ToInt(Request.Form["countt"]); int countw = ConvertUtility.ToInt(Request.Form["countw"]); string direction = ConvertUtility.Trim(Request.Form["direction"]); //if (unitService.UpdateUnit(unitIdCollection, area, countf, countt, countw, direction)) //{ // Response.Write("true"); //} //else //{ // Response.Write("false"); //} Response.End(); } } catch (Exception ex) { throw ex; } }
public EstateCmType(DataRow row) { this.BigestId = ConvertUtility.Trim(row["bigest"]); this.EstateId = ConvertUtility.Trim(row["estateid"]); this.EstateName = ConvertUtility.Trim(row["estatename"]); this.ScopeId = ConvertUtility.Trim(row["scp_id"]); this.Mark = ConvertUtility.ToInt(row["nmark"]); this.Phase = ConvertUtility.Trim(row["c_phase"]); this.EstateType = ConvertUtility.Trim(row["est_type"]); this.Address = ConvertUtility.Trim(row["address"]); this.CreateDate = ConvertUtility.ToDateTime(row["regdate"]); this.LastUpdate = ConvertUtility.ToDateTime(row["moddate"]); }
public UnitCmType(DataRow row) { this.UnitId = ConvertUtility.Trim(row["UnitId"]); this.BuildId = ConvertUtility.Trim(row["BuildId"]); this.CX_Axis = ConvertUtility.Trim(row["CX_Axis"]); this.CY_Axis = ConvertUtility.Trim(row["CY_Axis"]); this.CountF = ConvertUtility.ToInt(row["CountF"]); this.CountT = ConvertUtility.ToInt(row["CountT"]); this.CountW = ConvertUtility.ToInt(row["CountW"]); this.CountY = ConvertUtility.ToInt(row["CountY"]); this.DirectionTo = ConvertUtility.Trim(row["DirectionTo"]); this.Area = ConvertUtility.ToFloat(row["Area"]); }
/// <summary> /// 返回菜单类型 /// </summary> /// <returns></returns> public ActionResult GetNotSelectMenu() { int roleId = ConvertUtility.ToInt(Request["roleId"]); var list = gxSysMenuBusniess.GetNotSelectMenuRole(roleId).ToList(); var listData = list.Select(c => new EasyuiDropDown { Value = c.MenuId.ToString(), Text = c.MenuName }).ToList(); listData.Insert(0, new EasyuiDropDown { Value = "", Text = "请选择" }); return(Json(listData)); }
public static void UpdateEbayInventory() { DataTable sellerAccountDt = Db.Db.GetEbayDeveloperInfo(); foreach (DataRow sellerAccountDr in sellerAccountDt.Rows) { string accountName = sellerAccountDr["AccountName"].ToString(); try { string token = sellerAccountDr["Token"].ToString(); List <string> exceptList = ConfigurationManager.AppSettings["exceptList"].Split(',').ToList(); List <string> exceptSKUList = ConfigurationManager.AppSettings["exceptSKUList"].Split(',').ToList(); if (exceptList.Contains(accountName)) { continue; } else { DataTable adjustInventoryDt = EbayService.GetMyEbaySelling.GetMySelling(accountName, token, exceptSKUList); foreach (DataRow adjustInventoryDr in adjustInventoryDt.Rows) { string itemId = adjustInventoryDr["ItemID"].ToString(); string sku = adjustInventoryDr["SKU"].ToString(); string name = adjustInventoryDr["Name"].ToString(); try { int qty = ConvertUtility.ToInt(adjustInventoryDr["qty"]); double startPrice = ConvertUtility.ToDouble(adjustInventoryDr["startPrice"]); int soldQty = ConvertUtility.ToInt(adjustInventoryDr["soldQty"]); int quantityAvailable = ConvertUtility.ToInt(adjustInventoryDr["quantityAvailable"]); int isVariation = ConvertUtility.ToInt(adjustInventoryDr["isVariation"]); EbayService.UpdateInventoryByReviseFixedPriceItem.UpdateInventory(accountName, token, itemId, qty, sku, isVariation, soldQty, startPrice); } catch (Exception ex) { ExceptionUtility exceptionUtility = new ExceptionUtility(); exceptionUtility.CatchMethod(ex, "UpdateInventoryByReviseFixedPriceItem ", accountName + ":" + itemId + "(" + sku + ")" + " " + ex.Message.ToString(), senderEmail, messageFromPassword, messageToEmail, smtpClient, smtpPortNum); continue; } } } } catch (Exception ex) { ExceptionUtility exceptionUtility = new ExceptionUtility(); exceptionUtility.CatchMethod(ex, "Filter Account ", accountName + " " + ex.Message.ToString(), senderEmail, messageFromPassword, messageToEmail, smtpClient, smtpPortNum); continue; } } }
public ComparedBuildType(DataRow row) { this.ComparedId = ConvertUtility.ToInt(row["ComparedId"]); this.BuildId = ConvertUtility.Trim(row["BuildId"]); this.EstateId = ConvertUtility.Trim(row["EstateId"]); this.BuildName = ConvertUtility.Trim(row["BuildName"]); this.Address = ConvertUtility.Trim(row["Address"]); this.Framework_BuildId = ConvertUtility.Trim(row["Framework_BuildId"]); this.Framework_EstateId = ConvertUtility.Trim(row["Framework_EstateId"]); this.Framework_BuildName = ConvertUtility.Trim(row["Framework_BuildName"]); this.Framework_Address = ConvertUtility.Trim(row["Framework_Address"]); this.StatusId = ConvertUtility.ToInt(row["StatusId"]); this.ComparedDate = ConvertUtility.ToDateTime(row["ComparedDate"]); }
/// <summary> /// 页面显示的菜单数据列表 /// </summary> /// <returns></returns> public ActionResult Menu() { var gxSysMenuBusniess = new GxSysMenuBusniess(); #region 左边的菜单 //获取左边菜单的数据列 IList <RoleMenuBo> listBo = new List <RoleMenuBo>(); listBo = gxSysMenuBusniess.GetMenuRole(CurrentUser.Id); var listMenu = new List <Menus>(); int menuModel = 0; if (listBo.Count > 0) { for (int i = 0; i < listBo.Count; i++) { //如果第一次循环完成,判断第二次是不是同一个大类,否则继续下一个循环 if (menuModel == ConvertUtility.ToInt(listBo[i].ModelId)) { continue; } Menus menu = new Menus(); menu.Id = ConvertUtility.ToInt(listBo[i].MenuId); menu.Name = listBo[i].ModelName; menu.Url = "#"; menu.Icon = ""; menuModel = ConvertUtility.ToInt(listBo[i].ModelId); IList <RoleMenuBo> menubo = new List <RoleMenuBo>(); int ModelId = menuModel; menubo = listBo.Where(m => m.ParaMenuID == ModelId).ToList(); if (menubo.Count > 0) { for (int j = 0; j < menubo.Count; j++) { Menus menus = new Menus(); menus.Id = ConvertUtility.ToInt(menubo[j].MenuId); menus.Name = menubo[j].MenuName; menus.Url = menubo[j].LinkUrl; menus.Icon = menubo[j].IconType_Menu; menu.MenuList.Add(menus); } } listMenu.Add(menu); } } return(Json(new { menus = listMenu }, JsonRequestBehavior.AllowGet)); #endregion }
public static void UploadSingleTrackingNum(string trackingNum, string orderNum, string carrier, string accountName, string token) { string senderEmail = ConfigurationManager.AppSettings["senderEmail"]; string messageFromPassword = ConfigurationManager.AppSettings["messageFromPassword"]; string messageToEmail = ConfigurationManager.AppSettings["messageToEmail"]; string smtpClient = ConfigurationManager.AppSettings["smtpClient"]; int smtpPortNum = ConvertUtility.ToInt(ConfigurationManager.AppSettings["smtpPortNum"]); ApiContext context = new ApiContext(); context.ApiCredential.eBayToken = token; context.SoapApiServerUrl = "https://api.ebay.com/wsapi"; context.ApiLogManager = new ApiLogManager(); context.ApiLogManager.ApiLoggerList.Add(new FileLogger("log.txt", false, false, true)); context.ApiLogManager.EnableLogging = true; context.Version = "861"; context.Site = SiteCodeType.US; CompleteSaleCall completeSaleCall = new CompleteSaleCall(context); completeSaleCall.OrderID = orderNum; completeSaleCall.Shipped = true; completeSaleCall.Shipment = new ShipmentType(); completeSaleCall.Shipment.ShipmentTrackingDetails = new ShipmentTrackingDetailsTypeCollection(); ShipmentTrackingDetailsType shpmnt = new ShipmentTrackingDetailsType(); shpmnt.ShipmentTrackingNumber = trackingNum; shpmnt.ShippingCarrierUsed = carrier; completeSaleCall.Shipment.ShipmentTrackingDetails.Add(shpmnt); try { completeSaleCall.Execute(); try { Db.Db.UpdateShipmentInfoDt(orderNum, accountName, System.DateTime.Now); } catch (Exception ex) { ExceptionUtility exceptionUtility = new ExceptionUtility(); exceptionUtility.CatchMethod(ex, accountName + ": completeSaleCall " + orderNum, ex.Message.ToString(), senderEmail, messageFromPassword, messageToEmail, smtpClient, smtpPortNum); } } catch (Exception ex) { ExceptionUtility exceptionUtility = new ExceptionUtility(); exceptionUtility.CatchMethod(ex, accountName + ": completeSaleCall " + orderNum, ex.Message.ToString(), senderEmail, messageFromPassword, messageToEmail, smtpClient, smtpPortNum); } }
public BuildCtType(DataRow row) { this.BuildId = ConvertUtility.Trim(row["BuildId"]); this.EstateId = ConvertUtility.Trim(row["EstateId"]); this.BuildName = ConvertUtility.Trim(row["BuildName"]); this.Address = ConvertUtility.Trim(row["Address"]); this.Operate = ConvertUtility.ToInt(row["BuildName"]); this.Flow = ConvertUtility.ToInt(row["Address"]); this.AgencyCom_BuildId = ConvertUtility.Trim(row["AgencyCom_BuildId"]); this.AgencyCom_EstateId = ConvertUtility.Trim(row["AgencyCom_EstateId"]); this.AgencyCom_BuildName = ConvertUtility.Trim(row["AgencyCom_BuildName"]); this.AgencyCom_Address = ConvertUtility.Trim(row["AgencyCom_Address"]); this.CreateBy = ConvertUtility.Trim(row["CreateBy"]); this.CreateDate = ConvertUtility.ToDateTime(row["CreateDate"]); this.ModifyBy = ConvertUtility.Trim(row["ModifyBy"]); this.ModifyDate = ConvertUtility.ToDateTime(row["ModifyDate"]); }
public ActionResult Edit(FormCollection form, GX_SYS_ROLE gxSysRole) { int id = ConvertUtility.ToInt(form["Id"]); var model = gxSysRoleBusiness.Find(id); if (model == null) { return(Json(AjaxResult.Error("为找到需要更新的数据源!"))); } model.ROLENAME = form["ROLENAME"]; model.ROLEDESC = form["ROLEDESC"]; model.ROLESTATUS = form["ROLESTATUS"]; model.MODIFYBY = CurrentUser.UserId; model.MODIFYTIME = DateTime.Now; gxSysRoleBusiness.Update(model); return(Json(gxSysRoleBusiness.SaveChange() > 0 ? new OperationResult(OperationResultType.Success, "数据操作成功!") : new OperationResult(OperationResultType.Error, "数据操作失败!"))); }
protected void Page_Load(object sender, EventArgs e) { try { int recordCount; string type = ConvertUtility.Trim(Request.QueryString["type"]); string estateId = ConvertUtility.Trim(Request.QueryString["code"]); int pageIndex = ConvertUtility.ToInt(Request.QueryString["pageIndex"]); this.PageSize = AppSettings.PageSize; BuildFwService buildService = new BuildFwService(); this.BuildCollection = buildService.ListBuild(estateId, pageIndex, this.PageSize, out recordCount); this.RecordCount = recordCount; } catch (Exception ex) { throw ex; } }
public OrderItem(DataRow row) { this.Seq = ConvertUtility.ToInt(row["Seq"]); this.LotDescription = ConvertUtility.Trim(row["LotDescription"]); this.LotType = ConvertUtility.Trim(row["LotType"]); this.LotNo = ConvertUtility.Trim(row["LotNo"]); this.LotSection1 = ConvertUtility.Trim(row["LotSection1"]); this.LotSection2 = ConvertUtility.Trim(row["LotSection2"]); this.LotSection3 = ConvertUtility.Trim(row["LotSection3"]); this.LotSection4 = ConvertUtility.Trim(row["LotSection4"]); this.LotSection5 = ConvertUtility.Trim(row["LotSection5"]); this.Status = ProgressStatus.Search; }
static void Main(string[] args) { string senderEmail = ConfigurationManager.AppSettings["senderEmail"]; string messageFromPassword = ConfigurationManager.AppSettings["messageFromPassword"]; string messageToEmail = ConfigurationManager.AppSettings["messageToEmail"]; string smtpClient = ConfigurationManager.AppSettings["smtpClient"]; int smtpPortNum = ConvertUtility.ToInt(ConfigurationManager.AppSettings["smtpPortNum"]); try { AmazonMarketplaceMdl.Mdl.CreateAmazonUploadTrackingXml(); } catch (Exception ex) { ExceptionUtility exceptionUtility = new ExceptionUtility(); exceptionUtility.CatchMethod(ex, "UploadAmazonTracking Main ", ex.Message.ToString(), senderEmail, messageFromPassword, messageToEmail, smtpClient, smtpPortNum); } }
public int Compare(object a, object b) { string x = ConvertUtility.Trim(a); string y = ConvertUtility.Trim(b); if (!string.IsNullOrEmpty(x)) { x = x.Replace("楼", string.Empty); } if (!string.IsNullOrEmpty(y)) { y = y.Replace("楼", string.Empty); } int a_int = ConvertUtility.ToInt(x); int b_int = ConvertUtility.ToInt(y); return(b_int - a_int); }