public static int UpdateUserCategory(string tableName, int id, int pid, int uid, string name, string pinyin = null, string pinyinabbr = null, string ename = null) { if (pinyin == null) { pinyin = HZ.ToPinYin(name, true); } if (pinyinabbr == null) { pinyinabbr = PinYin.GetInitial(name); } if (ename == null) { ename = pinyin; } //check pid & uid if (pid != 0 && !DBH.GetBoolean(QA.DBCS_CMS, CommandType.Text, "SELECT COUNT(id) FROM " + tableName + " WHERE pid=@pid AND uid=@uid", new SqlParameter("@pid", pid), new SqlParameter("@uid", uid))) { return(-1); } return(EB <UserCategoryEntity> .Update(QA.DBCS_CMS, new UserCategoryEntity() { id = id, uid = uid, pid = pid, name = name, pinyin = pinyin, pinyinabbr = pinyinabbr, ename = ename }, tableName)); }
public static int CreateUserCategory(string tableName, int pid, int uid, string name, string pinyin = null, string pinyinabbr = null, string ename = null) { if (pinyin == null) { pinyin = HZ.ToPinYin(name, true); } if (pinyinabbr == null) { pinyinabbr = PinYin.GetInitial(name); } if (ename == null) { ename = pinyin; } return(EB <UserCategoryEntity> .Create(QA.DBCS_CMS, new UserCategoryEntity() { uid = uid, pid = pid, name = name, pinyin = pinyin, pinyinabbr = pinyinabbr, ename = ename }, tableName)); }
protected void btnClear_Click(object sender, EventArgs e) { HZ.DataSource = null; HZ.DataBind(); HZ.Visible = false; field.Visible = false; mx.Visible = false; }
public static int RenameUserCategory(string tableName, int id, string name) { string pinyin = HZ.ToPinYin(name, true); string pinyinabbr = PinYin.GetInitial(name); return(DBH.ExecuteText(QA.DBCS_CMS, "UPDATE " + tableName + " SET name=@name,pinyin=@pinyin,pinyinabbr=@pinyinabbr,ename=@ename WHERE id=@id", new SqlParameter("@name", name), new SqlParameter("@pinyin", pinyin), new SqlParameter("@pinyinabbr", pinyinabbr), new SqlParameter("@ename", pinyin), new SqlParameter("@id", id))); }
public static int Save(int uid, string uname, int cid, int ucid, string name, string sourcename, string sourceurl, string content) { return ContentData.Create("digest", new ContentEntity() { uid = uid, uname = uname, cid = cid, ucid = ucid, name = name, url = HZ.ToPinYin(name, true, true), source = sourcename, sourceurl = sourceurl, story = content }); }
protected void btnTongji_Click(object sender, EventArgs e) { IList <BillDetail> result = TheBillMgr.LoadBill(this.BillNo, true).BillDetails; var gp = (from i in result group i by new { i.ActingBill.Item.Code, i.ActingBill.ReferenceItemCode, i.ActingBill.Item.Description } into g select new { g.Key.Code, g.Key.ReferenceItemCode, g.Key.Description, Amount = g.Sum(i => i.BilledQty) }).ToList(); HZ.DataSource = gp; HZ.DataBind(); HZ.Visible = true; field.Visible = true; mx.Visible = true; tbshowTotal.Text = "零件总数:" + gp.Sum(i => i.Amount).ToString("0"); itemInList.DataSource = gp.Select(i => i.Code); itemInList.DataBind(); itemMX.Visible = false; btnClearMX.Visible = false; }
private void Scan(string ScanNO) { try { string Scan = ScanNO; barCode = ""; BLL.T_PickOrder t_PickOrder = new BLL.T_PickOrder(); string masterBar = t_PickOrder.GetScanOrder(); if (Scan == masterBar) { t_PickOrder.SaveScanedOrder(masterBar, 1); ShowOrderInfo(); //扫描条码与主序列匹配时关闭蜂鸣器 if (WriteOpc(OpcIn, "KittingLine1.KittingLine1-1.Lamp", "0")) { // MessageBox.Show("蜂鸣器发送失败"); } t_PickOrder.ExcuteScanBar(masterBar); } else { //扫描条码与主序列不匹配时触发蜂鸣器 if (WriteOpc(OpcIn, "KittingLine1.KittingLine1-1.Lamp", "1")) { } HZ hZ = new HZ("扫描错误!当前应扫描序列号为:" + masterBar); hZ.ShowDialog(); } this.orderInfo.Focus(); } catch (Exception ex) { MessageBox.Show(ex.ToString()); } }
/// <summary> /// 获取用户的个性域名 /// </summary> /// <param name="name"></param> /// <returns></returns> public static string GetWWW(string name) { string www = HZ.ToPinYin(name); if (www.Length > 20) { PinYin.GetInitial(name); } if (Keyword.Reserve(www) || UserData.ExistWWW(www)) { int i = 1; string w = www + "_" + i; while (Keyword.Reserve(w) || UserData.ExistWWW(w)) { i++; w = www + "_" + i; } www = w; } return(www); }
public int CompareTo(PetSkill y) { if (y == null) { return(1); } return(HZ == y.HZ && Template == y.Template ? Id.CompareTo(y.Id) : (HZ == y.HZ) ? Template.CompareTo(y.Template) : HZ.CompareTo(y.HZ)); }
private void _placeHZ(Vector3 defenderPosition) { HZ newHeatZone = Instantiate(HZ, defenderPosition, Quaternion.identity) as HZ; newHeatZone.transform.SetParent(transform); }