/// <summary> /// 用户性别 /// </summary> public string GetUserGenderData() { var billService = new cBillService(new SessionManager().CurrentUserLoginInfo); IList <BillStatusModel> list = new List <BillStatusModel>(); list.Add(new BillStatusModel() { Id = "1", Description = "男" }); list.Add(new BillStatusModel() { Id = "2", Description = "女" }); list.Add(new BillStatusModel() { Id = "0", Description = "未知" }); string content = string.Empty; var jsonData = new JsonData(); jsonData.totalCount = list.Count.ToString(); jsonData.data = list; content = jsonData.ToJSON(); return(content); }
/// <summary> /// 生成单据号码 /// </summary> public string NewOrderNoData(string typeCode) { var billService = new cBillService(CurrentUserInfo); string order_no; string content = string.Empty; order_no = billService.GetBillNextCode(typeCode); var jsonData = new JsonData(); jsonData.totalCount = "1"; jsonData.data = order_no; //Jayrock.Json.JsonTextWriter writer = new Jayrock.Json.JsonTextWriter(); //Jayrock.Json.Conversion.JsonConvert.Export(jsonData, writer); //content = writer.ToString(); //return content; //var jsonData = new JsonData(); //jsonData.totalCount = list.Count.ToString(); //jsonData.data = list; content = jsonData.ToJSON(); return(content); }
//数据行 删除处理逻辑 private void Row_DeleteItem(string id) { try { //string DelRuselt = "删除" + id.ToString() + "成功"; bool DelRuselt = new cBillService().DeleteBillActionRole(loggingSessionInfo, id); if (DelRuselt) { this.InfoBox.ShowPopInfo("删除成功!"); ////总查询记录数减 1 //SplitPageControl1.RecoedCount -= 1; } else { this.InfoBox.ShowPopError("删除失败!"); } //刷新当前页 Query(); } catch (Exception ex) { PageLog.Current.Write(ex); this.InfoBox.ShowPopError("删除失败!"); } }
/// <summary> /// /// </summary> public string GetData() { var billService = new cBillService(new SessionManager().CurrentUserLoginInfo); IList <BillStatusModel> list = new List <BillStatusModel>(); list.Add(new BillStatusModel() { Id = "ITEM", Description = "商品" }); list.Add(new BillStatusModel() { Id = "UNIT", Description = "门店" }); list.Add(new BillStatusModel() { Id = "SKU", Description = "SKU" }); list.Add(new BillStatusModel() { Id = "Hotel", Description = "Hotel" }); string content = string.Empty; var jsonData = new JsonData(); jsonData.totalCount = list.Count.ToString(); jsonData.data = list; content = jsonData.ToJSON(); return(content); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { initStatus(); initDataFrom(); loadReasonType(); LoadUnitsInfo(); var isDispalyAdd = new cBillService().CanCreateBillKind(loggingSessionInfo, "AJ"); if (isDispalyAdd) { btnAdd.Visible = true; } else { btnAdd.Visible = false; } SplitPageControl1.PageSize = int.Parse(this.Request.QueryString["pageSize"] ?? "10"); getConditionFromBack(); this.CurrentQueryCondition = GetConditionFromUI(); if (!string.IsNullOrEmpty(this.Request.QueryString["query_flg"])) { Query(int.Parse(this.Request.QueryString["pageIndex"] ?? "0")); } } }
private void loadBillMoney() { try { BillKindModel billsAction = new cBillService().GetBillKindById(loggingSessionInfo, this.cbBillKind.SelectedValue); if (billsAction.MoneyFlag == 1) { this.tbMaxMoney.Enabled = true; this.tbMinMoney.Enabled = true; } else { this.tbMinMoney.Text = "0"; this.tbMaxMoney.Text = "0"; //this.tbMaxMoney.ReadOnly = true; this.tbMaxMoney.Enabled = false; this.tbMinMoney.Enabled = false; } } catch (Exception ex) { PageLog.Current.Write(ex); this.InfoBox.ShowPopError("加载数据失败!"); } }
//数据行 删除处理逻辑 private void Row_DeleteItem(string id) { try { bool CanDel = new cBillService().CanDeleteBillAction(loggingSessionInfo, id); if (CanDel) { bool DelRuselt = new cBillService().DeleteBillAction(loggingSessionInfo, id); if (DelRuselt) { this.InfoBox.ShowPopInfo("删除成功!"); } else { this.InfoBox.ShowPopError("删除失败!"); } //刷新当前页 Query(this.cbBillKind.SelectedValue); } else { this.InfoBox.ShowPopError("表单操作被引用,不能被删除"); } } catch (Exception ex) { PageLog.Current.Write(ex); this.InfoBox.ShowPopError("删除失败!"); } }
private void loadBillData() { var bills = new cBillService().GetAllBillKinds(loggingSessionInfo); this.cbBillKind.DataSource = bills; this.cbBillKind.DataValueField = "Id"; this.cbBillKind.DataTextField = "Description"; this.cbBillKind.DataBind(); }
private void TestGetSkuPriceNotPackagedCount() { cPos.Service.cBillService bs = new cBillService(); cPos.Model.LoggingSessionInfo loggingSessionInfo = new LoggingSessionInfo(); loggingSessionInfo = new cPos.Service.CLoggingSessionService().GetLoggingSessionInfo("29E11BDC6DAC439896958CC6866FF64E", "7d4cda48970b4ed0aa697d8c2c2e4af3"); SkuPriceService skuService = new SkuPriceService();//GetSkuPriceNotPackagedCount this.lb1.Text = skuService.GetSkuPriceNotPackagedCount(loggingSessionInfo, "").ToString(); }
/// <summary> /// /// </summary> public string GetData() { var billService = new cBillService(new SessionManager().CurrentUserLoginInfo); IList <BillStatusModel> list = new List <BillStatusModel>(); //list.Add(new BillStatusModel() { Id = "1", Description = "无" }); list.Add(new BillStatusModel() { Id = "2", Description = "文字" }); //label list.Add(new BillStatusModel() { Id = "3", Description = "输入文本" }); //text list.Add(new BillStatusModel() { Id = "10", Description = "输入文本(数字)" }); //text list.Add(new BillStatusModel() { Id = "7", Description = "输入文本(多行)" }); //textarea list.Add(new BillStatusModel() { Id = "4", Description = "下拉选项" }); //select list.Add(new BillStatusModel() { Id = "5", Description = "日期选项(yyyy-MM-dd)" }); //select-date-(yyyy-MM-dd) list.Add(new BillStatusModel() { Id = "6", Description = "日期选项(yyyy-MM)" }); // select-date-(yyyy-MM) list.Add(new BillStatusModel() { Id = "8", Description = "富文本" }); list.Add(new BillStatusModel() { Id = "9", Description = "图片上传" }); list.Add(new BillStatusModel() { Id = "11", Description = "键值对" }); string content = string.Empty; var jsonData = new JsonData(); jsonData.totalCount = list.Count.ToString(); jsonData.data = list; content = jsonData.ToJSON(); return(content); }
/// <summary> /// Y/N状态 /// </summary> public string GetData() { var billService = new cBillService(new SessionManager().CurrentUserLoginInfo); IList <BillStatusModel> list = new List <BillStatusModel>(); list.Add(new BillStatusModel() { Id = "1", Description = "一" }); list.Add(new BillStatusModel() { Id = "2", Description = "二" }); list.Add(new BillStatusModel() { Id = "3", Description = "三" }); list.Add(new BillStatusModel() { Id = "4", Description = "四" }); list.Add(new BillStatusModel() { Id = "5", Description = "五" }); list.Add(new BillStatusModel() { Id = "6", Description = "六" }); list.Add(new BillStatusModel() { Id = "7", Description = "七" }); list.Add(new BillStatusModel() { Id = "8", Description = "八" }); list.Add(new BillStatusModel() { Id = "9", Description = "九" }); list.Add(new BillStatusModel() { Id = "10", Description = "十" }); string content = string.Empty; var jsonData = new JsonData(); jsonData.totalCount = list.Count.ToString(); jsonData.data = list; content = jsonData.ToJSON(); return(content); }
protected void gvAdjBill_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { var obj = (cPos.Model.InoutInfo)e.Row.DataItem; var flagmodel = new cBillService().GetBillActionByBillId(loggingSessionInfo, obj.order_id.ToString()); var lbcheck = (LinkButton)e.Row.FindControl("check"); var lbback = (LinkButton)e.Row.FindControl("back"); var lbdelete = (LinkButton)e.Row.FindControl("delete"); var lbmodify = (LinkButton)e.Row.FindControl("modify"); if (flagmodel == null) { lbcheck.Visible = false; lbdelete.Visible = false; lbmodify.Visible = false; lbback.Visible = false; return; } else { if (flagmodel.approve_flag == 1) { lbcheck.Visible = true; } else { lbcheck.Visible = false; } if (flagmodel.delete_flag == 1) { lbdelete.Visible = true; } else { lbdelete.Visible = false; } if (flagmodel.modify_flag == 1) { lbmodify.Visible = true; } else { lbmodify.Visible = false; } if (flagmodel.reject_flag == 1) { lbback.Visible = true; } else { lbback.Visible = false; } } } }
//加载状态函数 private void initStatus() { var source = new cBillService().GetBillStatusByKindCode(loggingSessionInfo, "RO"); source.Insert(0, new BillStatusModel { Status = "", Description = "全部" }); selStatus.DataValueField = "Status"; selStatus.DataTextField = "Description"; selStatus.DataSource = source; selStatus.DataBind(); }
private void initInvtoryNo() { try { var bs = new cBillService(); this.tbOrderNo.Text = bs.GetNo(loggingSessionInfo, "CC"); } catch (Exception ex) { this.InfoBox.ShowPopError("访问数据库失败!"); PageLog.Current.Write(ex); } }
//保存表单状态数据。 private void saveBillStatusData(BillActionModel data) { bool save = new cBillService().InsertBillAction(loggingSessionInfo, data); if (save) { this.Redirect("保存成功", InfoType.Info, this.Request.QueryString["from"] ?? "bill_action_query.aspx"); } else { this.InfoBox.ShowPopError("保存失败"); } }
private bool checkRepeatBillARData() { var check = new cBillService().CheckAddBillActionRole(loggingSessionInfo, currBillActionRoleData()); switch (check) { case BillActionRoleCheckState.Successful: { return(true); } case BillActionRoleCheckState.ExistModify: { this.InfoBox.ShowPopError("修改已存在"); return(false); } case BillActionRoleCheckState.ExistCreate: { this.InfoBox.ShowPopError("新建已存在"); return(false); } case BillActionRoleCheckState.ExistApprove: { this.InfoBox.ShowPopError("审批已存在"); return(false); } case BillActionRoleCheckState.ExistCancel: { this.InfoBox.ShowPopError("删除已存在"); return(false); } case BillActionRoleCheckState.ExistReject: { this.InfoBox.ShowPopError("回退已存在"); return(false); } case BillActionRoleCheckState.NotExistAction: { this.InfoBox.ShowPopError("不存在的操作"); return(false); } default: return(false); } }
//加载状态函数 private void initStatus() { var source = new cBillService().GetBillStatusByKindCode(loggingSessionInfo, "AJ"); selStatus.DataValueField = "Status"; selStatus.DataTextField = "Description"; selStatus.DataSource = source; selStatus.DataBind(); ListItem lis = new ListItem(); lis.Value = ""; lis.Text = "全部"; selStatus.Items.Insert(0, lis); }
private void saveBillActionRoleData(BillActionRoleModel data) { bool save = new cBillService().InsertBillActionRole(loggingSessionInfo, data); if (save) { this.Redirect("保存成功", InfoType.Info, this.Request.QueryString["from"] ?? "bill_role_action_query.aspx"); //this.InfoBox.ShowPopInfo("保存成功"); //this.Page.ClientScript.RegisterStartupScript(this.GetType(), "key", "<script>go_back();</script>"); } else { this.InfoBox.ShowPopError("保存失败"); } }
void Query(string s) { try { var service = new cBillService(); var querylist = service.GetAllBillActionsByBillKindId(loggingSessionInfo, s); gvBillAction.DataSource = querylist; gvBillAction.DataBind(); } catch (Exception ex) { PageLog.Current.Write(ex); this.InfoBox.ShowPopError("加载数据出错!"); } }
private void Query() { try { var service = new cBillService(); var querylist = service.SelectBillActionRoleList(loggingSessionInfo, QueryCondition); gvBill.DataSource = querylist; gvBill.DataBind(); } catch (Exception ex) { PageLog.Current.Write(ex); this.InfoBox.ShowPopError("加载数据失败!"); } }
private void loadBillData() { try { var bills = new cBillService().GetAllBillKinds(loggingSessionInfo); this.cbBillKind.DataSource = bills; this.cbBillKind.DataValueField = "Id"; this.cbBillKind.DataTextField = "Description"; this.cbBillKind.DataBind(); } catch (Exception ex) { PageLog.Current.Write(ex); this.InfoBox.ShowPopError("加载数据出错!"); } }
/// <summary> /// 单据状态 /// </summary> public string GetOrderStatusData(string typeCode) { var billService = new cBillService(new SessionManager().CurrentUserLoginInfo); IList <BillStatusModel> list; string content = string.Empty; list = billService.GetBillStatusByKindCode(typeCode); var jsonData = new JsonData(); jsonData.totalCount = list.Count.ToString(); jsonData.data = list; content = jsonData.ToJSON(); return(content); }
private void loadBillStatus() { try { var billsAction = new cBillService().GetAllBillStatusesByBillKindID(loggingSessionInfo, this.cbBillKind.SelectedValue); this.cbPrevBillStatus.DataSource = billsAction; this.cbPrevBillStatus.DataValueField = "Status"; this.cbPrevBillStatus.DataTextField = "Description"; this.cbPrevBillStatus.DataBind(); this.cbCurrBillStatus.DataSource = billsAction; this.cbCurrBillStatus.DataValueField = "Status"; this.cbCurrBillStatus.DataTextField = "Description"; this.cbCurrBillStatus.DataBind(); } catch (Exception ex) { PageLog.Current.Write(ex); this.InfoBox.ShowPopError("加载数据失败!"); } }
private void loadBillAction() { try { var billsAction = new cBillService().GetAllBillActionsByBillKindId(loggingSessionInfo, this.cbBillKind.SelectedValue); //billsAction.Insert(0, new BillActionModel { Id = "-1", Description = "请选择" }); this.cbBillAction.DataSource = billsAction; this.cbBillAction.DataValueField = "Id"; this.cbBillAction.DataTextField = "Description"; this.cbBillAction.DataBind(); //ListItem lis = new ListItem(); //lis.Text = "全部"; //lis.Value = ""; //this.cbRole.Items.Insert(0, lis); } catch (Exception ex) { PageLog.Current.Write(ex); this.InfoBox.ShowPopError("加载数据失败!"); } }
//检查输入选项 private bool checkInput() { if (this.cbCreateFlag.SelectedIndex == 0) { if (cbModifyFlag.SelectedIndex != 1) { this.InfoBox.ShowPopError("\"修改标志\"必须为\"否\""); this.cbModifyFlag.Focus(); return(false); } if (cbApproveFlag.SelectedIndex != 1) { this.InfoBox.ShowPopError("\"审核标志\"必须为\"否\""); this.cbApproveFlag.Focus(); return(false); } if (cbRejectFlag.Text.Trim() != "0") { this.InfoBox.ShowPopError("\"退回标志\"必须为否"); this.cbRejectFlag.Focus(); return(false); } if (cbCancelFlag.Text.Trim() != "0") { this.InfoBox.ShowPopError("\"删除标志\"必须为否"); this.cbCancelFlag.Focus(); return(false); } } else if (cbModifyFlag.SelectedIndex == 0) { if (cbCreateFlag.SelectedIndex != 1) { this.InfoBox.ShowPopError("\"新建标志\"必须为\"否\""); this.cbCreateFlag.Focus(); return(false); } if (cbApproveFlag.SelectedIndex != 1) { this.InfoBox.ShowPopError("\"审核标志\"必须为\"否\""); this.cbApproveFlag.Focus(); return(false); } if (cbRejectFlag.Text.Trim() != "0") { this.InfoBox.ShowPopError("\"退回标志\"必须为否"); this.cbRejectFlag.Focus(); return(false); } if (cbCancelFlag.Text.Trim() != "0") { this.InfoBox.ShowPopError("\"删除标志\"必须为否"); this.cbCancelFlag.Focus(); return(false); } } else if (cbApproveFlag.SelectedIndex == 0) { if (cbCreateFlag.SelectedIndex != 1) { this.InfoBox.ShowPopError("\"新建标志\"必须为\"否\""); this.cbCreateFlag.Focus(); return(false); } if (cbModifyFlag.SelectedIndex != 1) { this.InfoBox.ShowPopError("\"修改标志\"必须为\"否\""); this.cbModifyFlag.Focus(); return(false); } if (cbRejectFlag.Text.Trim() != "0") { this.InfoBox.ShowPopError("\"退回标志\"必须为否"); this.cbRejectFlag.Focus(); return(false); } if (cbCancelFlag.Text.Trim() != "0") { this.InfoBox.ShowPopError("\"删除标志\"必须为否"); this.cbCancelFlag.Focus(); return(false); } } else if (cbRejectFlag.SelectedIndex == 0) { if (cbCreateFlag.SelectedIndex != 1) { this.InfoBox.ShowPopError("\"新建标志\"必须为\"否\""); this.cbCreateFlag.Focus(); return(false); } if (cbModifyFlag.SelectedIndex != 1) { this.InfoBox.ShowPopError("\"修改标志\"必须为\"否\""); this.cbModifyFlag.Focus(); return(false); } if (cbApproveFlag.Text.Trim() != "0") { this.InfoBox.ShowPopError("\"审核标志\"必须为否"); this.cbApproveFlag.Focus(); return(false); } if (cbCancelFlag.Text.Trim() != "0") { this.InfoBox.ShowPopError("\"删除标志\"必须为否"); this.cbCancelFlag.Focus(); return(false); } } else if (cbCancelFlag.SelectedIndex == 0) { if (cbCreateFlag.SelectedIndex != 1) { this.InfoBox.ShowPopError("\"新建标志\"必须为\"否\""); this.cbCreateFlag.Focus(); return(false); } if (cbModifyFlag.SelectedIndex != 1) { this.InfoBox.ShowPopError("\"修改标志\"必须为\"否\""); this.cbModifyFlag.Focus(); return(false); } if (cbApproveFlag.Text.Trim() != "0") { this.InfoBox.ShowPopError("\"审核标志\"必须为否"); this.cbApproveFlag.Focus(); return(false); } if (cbRejectFlag.Text.Trim() != "0") { this.InfoBox.ShowPopError("\"退回标志\"必须为否"); this.cbRejectFlag.Focus(); return(false); } } var checkAction = new cBillService().CheckAddBillAction(loggingSessionInfo, currBillActionData()); switch (checkAction) { case BillActionCheckState.Successful: { return(true);; } case BillActionCheckState.ExistCode: { this.InfoBox.ShowPopError("编码已存在"); this.tbCode.Focus(); return(false); } case BillActionCheckState.ExistCreateAction: { this.InfoBox.ShowPopError("新建标志已存在"); this.cbCreateFlag.Focus(); return(false); } case BillActionCheckState.ExistApproveAction: { this.InfoBox.ShowPopError("审核标志已存在"); this.cbApproveFlag.Focus(); return(false); } case BillActionCheckState.ExistModifyAction: { this.InfoBox.ShowPopError("修改标志已存在"); this.cbModifyFlag.Focus(); return(false); } case BillActionCheckState.ExistRejectAction: { this.InfoBox.ShowPopError("退回标志已存在"); this.cbRejectFlag.Focus(); return(false); } case BillActionCheckState.ExistCancelAction: { this.InfoBox.ShowPopError("删除标志已存在"); this.cbCancelFlag.Focus(); return(false); } default: return(false); } }
//检查输入选项 private bool checkInput() { int result; if (cbBeginFlag.SelectedIndex == 0) { if (cbEndFlag.SelectedIndex != 1) { this.InfoBox.ShowPopError("\"结束标志\"必须为\"否\""); this.cbEndFlag.Focus(); return(false); } if (cbDeleteFlag.SelectedIndex != 1) { this.InfoBox.ShowPopError("\"删除标志\"必须为\"否\""); this.cbDeleteFlag.Focus(); return(false); } if (tbCustomerFlag.Text.Trim() != "0") { this.InfoBox.ShowPopError("\"自定义标志\"必须为否"); this.tbCustomerFlag.Focus(); return(false); } } else if (cbEndFlag.SelectedIndex == 0) { if (cbBeginFlag.SelectedIndex != 1) { this.InfoBox.ShowPopError("\"起始标志\"必须为\"否\""); this.cbBeginFlag.Focus(); return(false); } if (cbDeleteFlag.SelectedIndex != 1) { this.InfoBox.ShowPopError("\"删除标志\"必须为\"否\""); this.cbDeleteFlag.Focus(); return(false); } if (tbCustomerFlag.Text.Trim() != "0") { this.InfoBox.ShowPopError("\"自定义标志\"必须为否"); this.tbCustomerFlag.Focus(); return(false); } } else if (cbDeleteFlag.SelectedIndex == 0) { if (cbBeginFlag.SelectedIndex != 1) { this.InfoBox.ShowPopError("\"起始标志\"必须为\"否\""); this.cbBeginFlag.Focus(); return(false); } if (cbEndFlag.SelectedIndex != 1) { this.InfoBox.ShowPopError("\"结束标志\"必须为\"否\""); this.cbEndFlag.Focus(); return(false); } if (tbCustomerFlag.Text.Trim() != "0") { this.InfoBox.ShowPopError("\"自定义标志\"必须为否"); this.tbCustomerFlag.Focus(); return(false); } } else { if (int.TryParse(tbCustomerFlag.Text.Trim(), out result)) { if (tbCustomerFlag.Text.IndexOf(".") > -1) { this.InfoBox.ShowPopError("请输入整数"); this.tbCustomerFlag.Focus(); return(false); } else if (result < 1) { this.InfoBox.ShowPopError("\"自定义标志\"必须大于0"); this.tbCustomerFlag.Focus(); return(false); } } else { this.InfoBox.ShowPopError("请输入整数"); this.tbCustomerFlag.Focus(); return(false); } } var checkStatus = new cBillService().CheckAddBillStatus(loggingSessionInfo, currBillStatusData()); switch (checkStatus) { case BillStatusCheckState.Successful: { return(true); } case BillStatusCheckState.ExistBillStatus: { this.InfoBox.ShowPopError("状态已存在"); this.tbStatus.Focus(); return(false); } case BillStatusCheckState.ExistBegin: { this.InfoBox.ShowPopError("起始标志已存在"); this.cbBeginFlag.Focus(); return(false); } case BillStatusCheckState.ExistEnd: { this.InfoBox.ShowPopError("结束标志已存在"); this.cbEndFlag.Focus(); return(false); } case BillStatusCheckState.ExistDelete: { this.InfoBox.ShowPopError("删除标志已存在"); this.cbDeleteFlag.Focus(); return(false); } case BillStatusCheckState.ExistCustom: { this.InfoBox.ShowPopError("自定义标志已存在"); this.tbCustomerFlag.Focus(); return(false); } default: return(false); } }