public string Save(string ID, int BasicType, string ParamsName) { ReturnJson Result = new ReturnJson(); try { Mpr_Basic_Params TypeMod = BasicParamsService.GetModel(s => s.ID == ID); if (TypeMod == null) { TypeMod = new Mpr_Basic_Params(); TypeMod.ID = Guid.NewGuid().ToString("N"); TypeMod.BasicType = BasicType; TypeMod.ParamsName = ParamsName; TypeMod.Addtime = DateTime.Now; TypeMod.Adduser = currentadminUser.ID; BasicParamsService.Insert(TypeMod); } else { TypeMod.BasicType = BasicType; TypeMod.ParamsName = ParamsName; BasicParamsService.Update(TypeMod); } Result.Code = "0"; Result.Errmsg = "保存成功"; } catch (Exception ex) { Result.Code = "1"; Result.Errmsg = "保存异常"; } return(ToJson(Result)); }
public string Enable(dynamic requestData) { ReturnJson r = new ReturnJson(); int action = requestData.Flag; string zhuantiid = requestData.ZhuanTiId; if (action == 0 || action == 1) { if (!string.IsNullOrEmpty(zhuantiid)) { var sql = string.Format("UPDATE dbo.CpkZhuanTi SET IsEnable = {0} WHERE ZhuanTiId IN ({1})", action, zhuantiid); int a = dataContext.ExecuteNonQuery(CommandType.Text, sql); r.status = "succ"; r.message = a.ToString() + (action == 1 ? "条已启用" : "条已删除"); } else { r.message = "ZhuanTiId参数不能为空"; } } else { r.message = "Flag参数只能为0或1"; } return(JsonConvert.SerializeObject(r)); }
public ActionResult NoToReviewwhether(int SalesordeID)//反审核订单 { ReturnJson returnJson = new ReturnJson(); try { var list = myModels.PW_Salesorder.Where(m => m.SalesordeID == SalesordeID).Single(); if (list.Documents.Trim() == "未出货") { list.SalesordeID = list.SalesordeID; list.Reviewwhether = false; //审核否 list.Thereviewer = ""; //审核人 list.Auditdate = null; //审核时间 myModels.Entry(list).State = System.Data.Entity.EntityState.Modified; myModels.SaveChanges(); returnJson.State = true; } else { returnJson.State = false; returnJson.Text = "该单据已出货,不能反审核!"; } } catch (Exception) { return(Json(returnJson, JsonRequestBehavior.AllowGet)); } return(Json(returnJson, JsonRequestBehavior.AllowGet)); }
public IActionResult Login([FromBody] LoginViewModel model) { if (!ModelState.IsValid) { return(Json(ReturnJson.ServerError("数据格式错误"))); } try { var user = _db.Users.SingleOrDefault(c => c.UserName == model.UserName); if (user == null) { return(Json(ReturnJson.NotFound("该用户不存在"))); } if (user.Password != Crypto.DesEncrypt(model.Password)) { return(Json(ReturnJson.ServerError("用户名密码错误"))); } var userRole = Enum.GetName(typeof(CustomerEnum.UserRole), user.UserRole); var returnToken = getToken(model.UserName, userRole); return(Json(ReturnJson.Success(returnToken))); } catch (Exception ex) { return(Json(ReturnJson.ServerError(ex.ToString()))); } }
/// <summary> /// 获取营收排行【今日】 /// </summary> /// <returns></returns> public JsonResult GetSBRank2() { Dictionary <string, int> count = new Dictionary <string, int>(); ReturnJson r = new ReturnJson() { s = "ok" }; var now = DateTime.Now.Date; var tomorrow = now.AddDays(1); using (var db = new SHBTONLINEContext()) { var parent = db.PlayItems.Where(p => p.Get != null && p.CreateTime >= now && p.CreateTime < tomorrow).GroupBy(p => p.Loginname).ToList(); parent.ForEach(p => { var sb = p.ToList(); int sbcount = 0; for (int i = 0; i < sb.Count; i++) { if (sb[i] != null) { sbcount = sbcount + (int)sb[i].Get - (int)sb[i].Cost1; } } var queryemp = db.userinfoes.Where(w => w.LoginName == p.Key).First().Name; count.Add(queryemp, sbcount); }); r.r = count.OrderByDescending(p => p.Value); } return(Json(r)); }
public HttpResponseMessage GetSystemConfig() { JObject data = new JObject(); int Status = 0; string Message = "操作成功"; var userInfo = HttpContext.Current.GetOwinContext().Authentication.User.Claims; int mid = Convert.ToInt32(userInfo.ElementAt(0).Value); EMC.Model.tb001 model = EMC.DbUtility.Utility.GetModel <EMC.Model.tb001>(mid); data.Add("AdminName", model.F001TB001); List <EMC.Model.tb003> menuList = dal_System.GetMainMenu(mid); JArray listMenu = new JArray(); foreach (EMC.Model.tb003 modelTB003 in menuList) { JObject j = new JObject(); j.Add("ID", modelTB003.NOIDTB003); j.Add("Name", modelTB003.F001TB003); listMenu.Add(j); } data.Add("MainMenu", listMenu); ReturnJson.Add("Status", Status); ReturnJson.Add("Message", Message); ReturnJson.Add("data", data); return(ResponseJson(this.ReturnJson.ToString())); }
public string Enable(dynamic requestData) { LogHelper.WriteMsgByDay("CaiPinController-Enable-log:" + requestData.ToString()); ReturnJson r = new ReturnJson(); int action = requestData.Flag; string caipinId = requestData.CaiPinId; if (action == 0 || action == 1) { if (!string.IsNullOrEmpty(caipinId)) { var sql = string.Format("UPDATE CpkCaiPinBasicInfo SET IsEnable = {0} WHERE CaiPinId IN ({1}) ", action, caipinId); int a = dataContext.ExecuteNonQuery(CommandType.Text, sql); r.status = "succ"; r.message = a.ToString() + (action == 1 ? "条已启用" : "条已删除"); } else { r.message = "CaiPinId参数不能为空"; } } else { r.message = "Flag参数只能为0或1"; } return(JsonConvert.SerializeObject(r)); }
public string Save(string ID, string TypeName, int Sort) { ReturnJson Result = new ReturnJson(); try { Mpr_Material_Type TypeMod = Material_TypeService.GetModel(s => s.ID == ID); if (TypeMod == null) { TypeMod = new Mpr_Material_Type(); TypeMod.ID = Guid.NewGuid().ToString("N"); TypeMod.TypeName = TypeName; TypeMod.Sort = Sort; TypeMod.AddTime = DateTime.Now; TypeMod.AddUser = currentadminUser.ID; Material_TypeService.Insert(TypeMod); } else { TypeMod.TypeName = TypeName; TypeMod.Sort = Sort; TypeMod.UpdateTime = DateTime.Now; TypeMod.UpdateUser = currentadminUser.ID; Material_TypeService.Update(TypeMod); } Result.Code = "0"; Result.Errmsg = "保存成功"; } catch (Exception ex) { Result.Code = "1"; Result.Errmsg = "保存异常"; } return(ToJson(Result)); }
public string CreateFirst(dynamic requestData) { ReturnJson r = new ReturnJson(); string q = JsonConvert.SerializeObject(requestData.List); List <CpkFirstCategory> model = JsonConvert.DeserializeObject <List <CpkFirstCategory> >(q); foreach (var item in model) { var sql = string.Format("Select 1 from CpkFirstCategory Where FirstName = '{0}'", item.FirstName); var count = dataContext.GetCount(CommandType.Text, sql); if (count == 0) { db.CpkFirstCategory.Add(item); db.SaveChanges(); } else { r.message += item.FirstName + "已存在;"; } if (string.IsNullOrEmpty(r.message)) { r.status = "succ"; r.message = "添加成功"; } } return(JsonConvert.SerializeObject(r)); }
public Json <string> ImportExcel([FromFile] UserFile file) { string msg = "返回内容"; string result = "返回结果"; return(ReturnJson.Result(true, file.FileName, file.Extension)); }
public ActionResult SelectBalance(string BusinessNum)//查询单据付款状态 { ReturnJson returnJson = new ReturnJson(); try { var list = myModels.PW_Balance.Where(m => m.BusinessNum == BusinessNum).SingleOrDefault(); if (list != null) { if (list.BalanceStateID == 1) { returnJson.State = false; returnJson.Text = "您和该用户没有付款信息,或你们往来账已平衡!"; returnJson.ObjData = "该单已有付款记录,不能反审核,如要更改费用,请到财务管理客户费用中进行平衡处理。"; } else if (list.BalanceStateID == 2) { returnJson.State = true; returnJson.States = "A"; returnJson.Text = list.BalanceID.ToString(); returnJson.ObjData = "该单已有付款记录,不能反审核,如要更改费用,请到财务管理客户费用中进行平衡处理。"; } } else { returnJson.State = true; } } catch (Exception) { returnJson.State = false; returnJson.Text = "数据异常!"; } return(Json(returnJson, JsonRequestBehavior.AllowGet)); }
public HttpResponseMessage ChangePassword() { string oldpwd = HttpContext.Current.Request["oldpwd"]; string newpwd = HttpContext.Current.Request["newpwd"]; JObject data = new JObject(); int Status = 0; string Message = "操作成功"; var userInfo = HttpContext.Current.GetOwinContext().Authentication.User.Claims; int mid = Convert.ToInt32(userInfo.ElementAt(0).Value); EMC.Model.tb001 model = EMC.DbUtility.Utility.GetModel <EMC.Model.tb001>(mid); if (model.F003TB001 != EMC.Com.Common.StringToMD5(oldpwd)) { Status = 1; Message = "原始密码不正确"; } else { model.F003TB001 = EMC.Com.Common.StringToMD5(newpwd); model.F200TB001 = mid; model.F201TB001 = DateTime.Now; EMC.DbUtility.Utility.Update <EMC.Model.tb001>(model); } ReturnJson.Add("Status", Status); ReturnJson.Add("Message", Message); ReturnJson.Add("data", data); return(ResponseJson(this.ReturnJson.ToString())); }
public HttpResponseMessage GetReloList() { string key = HttpContext.Current.Request["key"]; int page = Convert.ToInt32(HttpContext.Current.Request["page"]); int limit = Convert.ToInt32(HttpContext.Current.Request["limit"]); JObject data = new JObject(); int Status = 0; string Message = "操作成功"; var userInfo = HttpContext.Current.GetOwinContext().Authentication.User.Claims; int mid = Convert.ToInt32(userInfo.ElementAt(0).Value); int count = 0; List <EMC.Model.tb006> reloList = dal_System.GetReloList(key, page, limit, ref count); JArray listRelo = new JArray(); foreach (EMC.Model.tb006 modelTB006 in reloList) { JObject j = new JObject(); j.Add("id", modelTB006.NOIDTB006); j.Add("name", modelTB006.F001TB006); j.Add("explain", modelTB006.F002TB006); listRelo.Add(j); } data.Add("code", count > 0 ? 0 : 1); data.Add("msg", count > 0 ? "获取成功" : "没有数据"); data.Add("total", count); data.Add("item", listRelo); ReturnJson.Add("Status", Status); ReturnJson.Add("Message", Message); ReturnJson.Add("data", data); return(ResponseJson(this.ReturnJson.ToString())); }
public string Publish(dynamic requestData) { ReturnJson r = new ReturnJson(); int action = requestData.Flag; string SecondId = requestData.SecondId; if (action == 0 || action == 1) { if (!string.IsNullOrEmpty(SecondId)) { var sql = string.Format("UPDATE dbo.CpkSecondCategory SET IsPublish = {0} WHERE SecondId IN ({1})", action, SecondId); int a = dataContext.ExecuteNonQuery(CommandType.Text, sql); r.status = "succ"; r.message = a.ToString() + (action == 1 ? "条发布成功" : "条已取消发布"); } else { r.message = "SecondId参数不能为空"; } } else { r.message = "Flag参数只能为0或1"; } return(JsonConvert.SerializeObject(r)); }
public string Create(dynamic requestData) { LogHelper.WriteMsgByDay("BanKuaiController-Create-log:" + requestData.ToString()); ReturnJson r = new ReturnJson(); string bankuainame = requestData.BanKuaiName; if (bankuainame.Length > 0 && bankuainame.Length <= 14) { string sql = string.Format(@"SELECT * FROM dbo.CpkBanKuai WHERE BanKuaiName = '{0}'", bankuainame); int count = SqlHelper2.GetCountByCountSql(sql); if (count == 0) { sql = string.Format(@"INSERT INTO dbo.CpkBanKuai( BanKuaiName )VALUES ('{0}')", bankuainame); dataContext.ExecuteNonQuery(CommandType.Text, sql); r.status = "succ"; r.message = "创建成功"; } else { r.message = "该板块已存在"; } } else if (bankuainame.Length > 14) { r.message = "板块名称长度已超过14"; } else { r.message = "BanKuaiName不能为空"; } return(JsonConvert.SerializeObject(r)); }
public string LoginSubmit(string uid, string password) { ReturnJson Result = new ReturnJson(); Sys_AdminService AdminService = new Sys_AdminService(); string md5pwd = Tools.ToMD5(password); Sys_Admin Mod = AdminService.GetModel(s => s.UName == uid.Trim() && s.LoginPwd == md5pwd); if (Mod == null) { Result.Code = "1"; Result.Errmsg = "用户名或密码错误"; } else { if (Mod.IsLock == 1) { Result.Code = "1"; Result.Errmsg = "当前账户已锁定"; } else { currentadminUser = Mod; Result.Code = "0"; Result.Errmsg = ""; } } return(ToJson(Result)); }
public string Edit(dynamic requestData) { ReturnJson r = new ReturnJson(); int bankuaiId = requestData.BanKuaiId; string bankuainame = requestData.BanKuaiName; if (bankuainame.Length > 0 && bankuainame.Length <= 14) { var sql = string.Format(@"UPDATE dbo.CpkBanKuai SET BanKuaiName = '{0}' ,UpdateDate = GETDATE() WHERE BanKuaiId = {1} ; ", bankuainame, bankuaiId); int a = dataContext.ExecuteNonQuery(CommandType.Text, sql); if (a > 0) { r.message = "更新成功"; r.status = "succ"; } else { r.message = "更新失败"; } } else if (bankuainame.Length > 14) { r.message = "板块名称长度已超过14"; } else { r.message = "BanKuaiName不能为空"; } return(JsonConvert.SerializeObject(r)); }
// // GET: /WechatOAuth/ public async Task <ActionResult> Index() { WechatUtils wechatUtil = new WechatUtils(); ReturnJson json = await wechatUtil.GetRedirectUrl(); return(Redirect(json.Res.Data.redirectURL)); }
public ActionResult FudongUpdate(int?fuDong) { ReturnJson returnJson = new ReturnJson(); try { var agentEntity = agentBll.GetEntityByOpenId(CurrentWxUser.OpenId); if (agentEntity != null) { Wechat_AgentEntity entity = new Wechat_AgentEntity() { FuDong = fuDong, }; agentBll.FuDongUpdate(agentEntity.Id, fuDong); returnJson.msg = "success"; returnJson.code = 200; return(Json(returnJson)); } else { var root = new ReturnJson { code = 401, msg = "fail" }; return(Json(root)); } } catch (Exception) { throw; } }
public ActionResult JudgingQuantity(List <RestockDetail> listRestockDetai)//判断领料数量 { ReturnJson returnJosn = new ReturnJson(); returnJosn.State = true; foreach (var item in listRestockDetai) { var listCollage = myModels.SYS_CollageDetai.Where(m => m.CollageDetaiID == item.CollageDetaiID).SingleOrDefault(); var Quantity = item.Quantity; if (listCollage != null) { if (Quantity < 0) { returnJosn.Text = "配件编码为" + listCollage.FittingsCode + "的退料数量不能小于0!"; returnJosn.State = false; } else if (Quantity > listCollage.Quantity) { returnJosn.Text = "配件编码为" + listCollage.FittingsCode + "的退料数量不能超过领料的数量!"; returnJosn.State = false; } } } return(Json(returnJosn, JsonRequestBehavior.AllowGet)); }
public string CreateSecond(dynamic requestData) { ReturnJson r = new ReturnJson(); string q = JsonConvert.SerializeObject(requestData.List); List <CpkSecondCategory> model = JsonConvert.DeserializeObject <List <CpkSecondCategory> >(q); foreach (var item in model) { var sql = string.Format(@"SELECT 1 FROM dbo.CpkFirstCategory a JOIN dbo.CpkSecondCategory b ON b.FirstId = a.FirstId WHERE b.SecondName = '{0}' ", item.SecondName); var count = dataContext.GetCount(CommandType.Text, sql); if (count == 0) { db.CpkSecondCategory.Add(item); db.SaveChanges(); } else { r.status = "fail"; r.message += item.SecondName + "已存在"; } if (string.IsNullOrEmpty(r.message)) { r.status = "succ"; r.message = "添加成功"; } } return(JsonConvert.SerializeObject(r)); }
public JsonResult MobileLogin(LoginViewModel model) { ReturnJson r = new ReturnJson() { s = "ok" }; int count = 0; var bty = HashCode.EncryptWithMD5(model.Password); model.Password = bty; var query = db.userinfoes.Where(p => p.LoginName == model.LoginName && p.PSW == bty).ToList(); count = query.Count; if (count > 0) { r.r = new { loginname = query[0].LoginName, avatar = query[0].IMG, dota2id = query[0].DOTA2ID, pubgid = query[0].PubgID, key = query[0].PrivateKey, sb = query[0].SCrrency, name = query[0].Name, card = query[0].Card_bg, wechatid = string.IsNullOrEmpty(query[0].WechatID)?false:true }; } else { r.s = "error"; r.r = "帐号或密码错误"; } return(Json(r)); }
/// <summary> /// 修改个人资料 /// </summary> /// <param name="mode"></param> /// <returns></returns> public JsonResult MobileSaveUserEdit(EditUserInfo mode) { ReturnJson r = new ReturnJson() { s = "ok", r = "修改成功!" }; var querypsw = db.userinfoes.Where(p => p.LoginName == mode.LoginName).FirstOrDefault(); try { querypsw.DOTA2ID = mode.DOTA2ID; querypsw.PubgID = mode.PubgID; querypsw.Email = mode.Email; querypsw.Name = mode.userName; db.userinfoes.Attach(querypsw); db.Entry(querypsw).Property(x => x.DOTA2ID).IsModified = true; db.Entry(querypsw).Property(x => x.PubgID).IsModified = true; db.Entry(querypsw).Property(x => x.Email).IsModified = true; db.Entry(querypsw).Property(x => x.Name).IsModified = true; db.SaveChanges(); return(Json(r)); } catch (Exception ex) { r.r = "修改失败," + ex.Message; r.s = "error"; return(Json(r)); } }
public string CreateOrEditStep2(dynamic requestData) { LogHelper.WriteMsgByDay("CaiPinController-CreateOrEditStep2-log:" + requestData.ToString()); ReturnJson r = new ReturnJson(); try { string sql = ""; string action = requestData.Action; //接口类型 分Create Edit var richlist = requestData.List; int caipinid = requestData.CaiPinId; int dyrqShow = requestData.dyrqShow; string hotelLongitude = requestData.HotelLongitude; string hotelAtitude = requestData.HotelAtitude; //编辑时先删除 if (action == "Edit") { sql = string.Format(@"UPDATE CpkCaiPinBasicInfo SET HotelLongitude ='{1}',HotelAtitude = '{2}',DyrqShow = '{3}' WHERE CaiPinId = {0} ; DELETE FROM CpkCaiPinRichInfo WHERE CaiPinId = {0}", caipinid, hotelLongitude, hotelAtitude, dyrqShow); dataContext.ExecuteNonQuery(CommandType.Text, sql); } foreach (var item in richlist) { int typeid = item["TypeId"]; int display = item["Display"]; string content = item["Content"].ToString().Replace("\"", "'"); LogHelper.WriteMsgByDay("CaiPinController-content-log:" + content); if (content.IndexOf("base64") > 0) { foreach (string a in CaiPinKuAPI.Common.ImageHandle.GetHtmlImageUrlList(content)) { LogHelper.WriteMsgByDay("CaiPinController-string a-log:" + a); LogHelper.WriteMsgByDay("CaiPinController-Common.ImageHandle.DNS-log:" + Common.ImageHandle.DNS); if (a.IndexOf(Common.ImageHandle.DNS) < 0) { string[] asplit = a.Split(','); LogHelper.WriteMsgByDay("CaiPinController-asplit-log:" + asplit.ToString()); string imgtype = asplit[0].Substring(11, asplit[0].Length - 18); LogHelper.WriteMsgByDay("CaiPinController-imgtype-log:" + imgtype); string filepath = Common.ImageHandle.Base64StringToImage(asplit[1], imgtype, "/Images"); content = content.Replace(a, filepath); } } } sql = string.Format(@"INSERT INTO dbo.CpkCaiPinRichInfo ( CaiPinId ,TypeId ,Content,Display ) VALUES ({0},{1},'{2}',{3}) ", caipinid, typeid, content.Replace("'", "''"), display); dataContext.ExecuteNonQuery(CommandType.Text, sql); r.message += "富文本类型" + typeid.ToString() + action + "成功;"; } r.status = "succ"; } catch (Exception ex) { r.message = ex.ToString(); LogHelper.WriteMsgByDay("CaiPinController-CreateOrEditStep2-error:" + ex.ToString()); } return(JsonConvert.SerializeObject(r)); }
public JsonResult MobileRegister(RegisterViewModel model) { ReturnJson r = new ReturnJson() { s = "ok" }; if (ModelState.IsValid) { var query = db.userinfoes.Where(p => p.LoginName == model.LoginName); if (query.Count() > 0) { r.s = "error"; r.r = "注册失败,账号已被注册过。"; } var query2 = db.userinfoes.Where(p => p.LoginName == model.LoginName); if (query2.Count() > 0) { r.s = "error"; r.r = "该邮箱已被注册过"; } if (query2.Count() == 0 && query.Count() == 0) { try { userinfo mode = new userinfo() { ID = Guid.NewGuid().ToString(), Email = model.Email, LoginName = model.LoginName, Name = model.userName, PSW = model.Password, DOTA2ID = model.DOTA2ID, PubgID = model.PubgID, PrivateKey = Guid.NewGuid().ToString(), SCrrency = 0, sacrifNum = 0 }; var bty = HashCode.EncryptWithMD5(model.Password); mode.PSW = bty; db.userinfoes.Add(mode); db.SaveChanges(); } catch (Exception ex) { r.s = "error"; r.r = "注册失败" + ex.Message; } //ModelState.AddModelError("", "注册失败,未知错误,请联系管理员。"); } } else { r.s = "error"; r.r = "注册失败,请检查邮箱格式是否正确并表单填写完整"; } // 如果我们进行到这一步时某个地方出错,则重新显示表单 return(Json(r)); }
/// <summary> /// 签到保存数据 /// </summary> /// <param name="LoginName"></param> /// <returns></returns> public JsonResult UpAttendanceData(string LoginName) { using (var db = new SHBTONLINEContext()) { //开启事务 using (var tran = db.Database.BeginTransaction()) { try { var userinfo = db.userinfoes.Where(a => a.LoginName == LoginName).FirstOrDefault(); var queryAttend = db.AttendanceInfos.Where(p => p.AD_LoginName == LoginName).Where(p => p.AD_AttendTime.Value.Year == DateTime.Now.Year && p.AD_AttendTime.Value.Month == DateTime.Now.Month && p.AD_AttendTime.Value.Day == DateTime.Now.Day).ToList(); //说明未签到 if (queryAttend.Count() < 1) { //签到数据绑定。 AttendanceInfo model = new AttendanceInfo() { ID = Guid.NewGuid().ToString(), AD_Id = userinfo.ID, AD_LoginName = LoginName, AD_AttendTime = DateTime.Now, Create_Time = DateTime.Now }; //var queryattendline=db.AttendanceInfos. db.AttendanceInfos.Add(model); //db.Entry(model).State= System.Data.Entity.EntityState.Added; //签到给S币 //s币数据的计算[判断方法]建议改掉S币数据类型 userinfo.SCrrency = userinfo.SCrrency + 2; db.userinfoes.Attach(userinfo); db.Entry(userinfo).Property(x => x.SCrrency).IsModified = true; db.SaveChanges(); tran.Commit(); ReturnJson r = new ReturnJson() { s = "ok", r = "签到完成,获得S币+2s!" }; return(Json(r)); } else { ReturnJson r = new ReturnJson() { s = "error", r = "已签到,想白嫖?" }; return(Json(r)); } } catch (Exception e) { tran.Rollback(); ReturnJson r = new ReturnJson { r = "error", s = "删除失败!" + e.Message }; return(Json(r)); } } } }
static void GetFeedSpindle(ref CNCInfoClass CNCInfo, ref ReturnJson returnJson) { CNCInfo.READ_feed_spindle(0, 0, out double OvFeed, out uint OvSpindle, out double ActFeed, out uint ActSpindle); returnJson.FeedSpindleOvFeed = OvFeed.ToString(); returnJson.FeedSpindleOvSpindle = OvSpindle.ToString(); returnJson.FeedSpindleActFeed = ActFeed.ToString(); returnJson.FeedSpindleActSpindle = ActSpindle.ToString(); }
public string GetMaterialUnit() { ReturnJson r = new ReturnJson(); string sql = "SELECT Id,Unit FROM dbo.CpkUnit ORDER BY Id"; var q = dataContext.ExecuteDataTable(CommandType.Text, sql); return(JsonConvert.SerializeObject(q)); }
public string GetProducts() { ReturnJson r = new ReturnJson(); string sql = "SELECT ProductId,ProductName FROM dbo.ProductKuInfo ORDER BY ProductId"; var q = dataContext.ExecuteDataTable(CommandType.Text, sql); return(JsonConvert.SerializeObject(q)); }
public string Get() { ReturnJson r = new ReturnJson(); string sql = "SELECT BanKuaiId,BanKuaiName FROM dbo.CpkBanKuai WHERE IsEnable =1 ORDER BY BanKuaiId"; var q = dataContext.ExecuteDataTable(CommandType.Text, sql); return(JsonConvert.SerializeObject(q)); }