| | |
| | | //str1 = str1 + "<td>" + (object)this.ClassesToName(bean.Classes) + "</td>"; |
| | | if (bean.RouterType == 1) |
| | | { |
| | | str1 += "<td rowspan=\"1\"><div class=\"btn btn-primary btn-xs\">点路由</div>"; |
| | | str1 += "<td rowspan=\"1\"><span class='label label-primary'>通道</span>"; |
| | | str1 += string.Format("<div>移动:{0}</div><div>电信:{1}</div><div>联通:{2}</div>", (object)this.GetOpName(bean.CmOpId), (object)this.GetOpName(bean.CtOpId), (object)this.GetOpName(bean.CuOpId)); |
| | | } |
| | | else if (bean.RouterType == 3) |
| | | { |
| | | str1 += "<td rowspan=\"1\"><div class=\"btn btn-success btn-xs\">组路由</div>"; |
| | | str1 += "<td rowspan=\"1\"><span class='label label-success'>通道组</span>"; |
| | | str1 += string.Format("<div>移动:{0}</div><div>电信:{1}</div><div>联通:{2}</div>", (object)this.GetGroupName(bean.CmGroupid), (object)this.GetGroupName(bean.CtGroupid), (object)this.GetGroupName(bean.CuGroupid)); |
| | | } |
| | | else |
| | |
| | | "</td>" |
| | | }); |
| | | |
| | | str1 += string.Format("<td>{0}元/条</td>", (object)(Convert.ToDecimal(bean.Price) / new Decimal(1000))); |
| | | str1 += string.Format("<td>{0}</td>", (object)(Convert.ToDecimal(bean.Price) / new Decimal(1000))); |
| | | str1 = str1 + "<td>" + bean.CreateTime + "</td>"; |
| | | str1 = string.Concat(new object[4] |
| | | { |
| | |
| | | bean.Instructions, |
| | | "</td>" |
| | | }); |
| | | str1 += "<td class=\"text-right\">"; |
| | | str1 += "<td class=\"text-center \">"; |
| | | str1 = bean.IsEnable != 0 ? str1 + string.Format("<a href=\"javascript:;\" data-id=\"{0}\" data-is_enable=\"0\" class=\"action-update-status btn btn-primary btn-xs\"><i class=\"fa fa-toggle-off\"></i> 停用</a> ", (object) bean.Id ) : str1 + string.Format("<a href=\"javascript:;\" data-id=\"{0}\" data-is_enable=\"1\" class=\"action-update-status btn btn-default btn-xs\"><i class=\"fa fa-toggle-on\"/></i> 启用</a> ", (object) bean.Id ); |
| | | str1 += string.Format("<a href=\"javascript:;\" data-id=\"{0}\" class=\"action-modal-edit btn btn-success btn-xs\"><i class=\"fa fa-edit\"></i> 编辑</a> ", (object) bean.Id); |
| | | str1 += string.Format("<a href=\"javascript:;\" data-id=\"{0}\" class=\"action-delete btn btn-default btn-xs\"><i class=\"fa fa-trash\"></i> 删除</a> ", (object) bean.Id); |
| | |
| | | str1 = str1 + "<td>" + bean.CreateTime + "</td>"; |
| | | str1 = str1 + "<td>" + bean.Remark + "</td>"; |
| | | |
| | | str1 += "<td class=\"text-right\">"; |
| | | str1 += "<td class=\"text-center\">"; |
| | | str1 = bean.IsEnable != 0 ? str1 + string.Format("<a href=\"javascript:;\" data-id=\"{0}\" data-is_enable=\"0\" class=\"action-update-status btn btn-primary btn-xs\"><i class=\"fa fa-toggle-off\"></i> 停用</a> ", (object) bean.Id ) : str1 + string.Format("<a href=\"javascript:;\" data-id=\"{0}\" data-is_enable=\"1\" class=\"action-update-status btn btn-default btn-xs\"><i class=\"fa fa-toggle-on\"/></i> 启用</a> ", (object) bean.Id ); |
| | | str1 += string.Format("<a href=\"javascript:;\" data-id=\"{0}\" class=\"action-modal-edit btn btn-success btn-xs\"><i class=\"fa fa-edit\"></i> 编辑</a> ", (object) bean.Id); |
| | | str1 += string.Format("<a href=\"javascript:;\" data-id=\"{0}\" class=\"action-delete btn btn-default btn-xs\"><i class=\"fa fa-trash\"></i> 删除</a> ", (object) bean.Id); |
| | |
| | | int ctGroupid = 0; |
| | | int price = 0; |
| | | int givingNum = 0; |
| | | |
| | | string parentId = context.GetString("parentId", ""); |
| | | string path = ""; |
| | | if (string.IsNullOrEmpty(parentId) ) |
| | | { |
| | | path = "0"; |
| | | } |
| | | else |
| | | { |
| | | GwProduct newProduct = _Dao.Get(parentId); |
| | | if(newProduct!=null) |
| | | { |
| | | path = newProduct.Path=="" ? "0" : newProduct.Path + "," + newProduct.Id ; |
| | | } |
| | | else |
| | | { |
| | | path = "0"; |
| | | } |
| | | |
| | | } |
| | | |
| | | string info = "" ; |
| | | if (classes == -1) { |
| | |
| | | if (string.IsNullOrEmpty(name)) |
| | | { |
| | | throw new ArgumentException(info + "名称不能为空!"); |
| | | } |
| | | |
| | | if (string.IsNullOrEmpty(parentId)) |
| | | { |
| | | throw new ArgumentException("所属产品类别不能为空!"); |
| | | } |
| | | |
| | | } |
| | |
| | | } |
| | | |
| | | } |
| | | string parentId = context.GetString("parentId", "0"); |
| | | string path = ""; |
| | | if (parentId.Equals("0")) |
| | | { |
| | | path = "0"; |
| | | } |
| | | else |
| | | { |
| | | GwProduct newProduct = _Dao.Get(parentId); |
| | | if(newProduct!=null) |
| | | { |
| | | path = newProduct.Path=="" ? "0" : newProduct.Path + "," + newProduct.Id ; |
| | | } |
| | | else |
| | | { |
| | | path = "0"; |
| | | } |
| | | |
| | | } |
| | | int isEnable = context.GetInt("isEnable", 0); |
| | | |
| | | //int price = context.GetInt("price", 0); |
| | |
| | | int ctGroupid = 0; |
| | | int price = 0; |
| | | int givingNum = 0; |
| | | |
| | | string parentId = context.GetString("parentId", ""); |
| | | string path = ""; |
| | | if (string.IsNullOrEmpty(parentId) ) |
| | | { |
| | | path = "0"; |
| | | } |
| | | else |
| | | { |
| | | GwProduct newProduct = _Dao.Get(parentId); |
| | | if(newProduct!=null) |
| | | { |
| | | path = newProduct.Path=="" ? "0" : newProduct.Path + "," + newProduct.Id ; |
| | | } |
| | | else |
| | | { |
| | | path = "0"; |
| | | } |
| | | |
| | | } |
| | | |
| | | string info = "" ; |
| | | if (classes == -1) { |
| | |
| | | if (string.IsNullOrEmpty(name)) |
| | | { |
| | | throw new ArgumentException(info + "名称不能为空!"); |
| | | } |
| | | |
| | | if (string.IsNullOrEmpty(parentId)) |
| | | { |
| | | throw new ArgumentException("所属产品类别不能为空!"); |
| | | } |
| | | |
| | | } |
| | |
| | | } |
| | | |
| | | } |
| | | string parentId = context.GetString("parentId", "0"); |
| | | string path = ""; |
| | | if (parentId.Equals("0")) |
| | | { |
| | | path = "0"; |
| | | } |
| | | else |
| | | { |
| | | GwProduct newProduct = _Dao.Get(parentId); |
| | | if(newProduct!=null) |
| | | { |
| | | path = newProduct.Path=="" ? "0" : newProduct.Path + "," + newProduct.Id ; |
| | | } |
| | | else |
| | | { |
| | | path = "0"; |
| | | } |
| | | |
| | | } |
| | | int isEnable = context.GetInt("isEnable", 0); |
| | | |
| | | string remark = context.GetString("remark", ""); |
| | |
| | | if (classes == -1) |
| | | return string.Empty; |
| | | else if(classes == 0) |
| | | return "0-产品分类"; |
| | | return "产品分类"; |
| | | else if(classes == 1) |
| | | return "1-产品"; |
| | | return "产品"; |
| | | |
| | | return string.Empty; |
| | | } |
| | |
| | | if (isDefault == -1) |
| | | return string.Empty; |
| | | else if(isDefault == 0) |
| | | return "0-个性化"; |
| | | return "<span class='label label-warning'>个性化</span>"; |
| | | else if(isDefault == 1) |
| | | return "1-系统默认"; |
| | | return "<span class='label label-success'>系统默认</span>"; |
| | | |
| | | return string.Empty; |
| | | } |
| | |
| | | if (isEnable == -1) |
| | | return string.Empty; |
| | | else if(isEnable == 0) |
| | | return "0-停用"; |
| | | return "<span class='label label-default'>已停用</span>"; |
| | | else if(isEnable == 1) |
| | | return "1-启用"; |
| | | return "<span class='label label-primary'>已启用</span>"; |
| | | |
| | | return string.Empty; |
| | | } |