コード例 #1
0
        /// <summary>
        /// 修改菜单
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void bbi_Edit_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            Model.WORKFLOWSETADD workflowsetaddMdl = new Model.WORKFLOWSETADD();
            workflowsetaddMdl.WORKFLOWNAME = clbc_workflow.Items[clbc_workflow.SelectedIndex].ToString();
            if (workflowsetaddMdl.WORKFLOWNAME.Length <= 0 || workflowsetaddMdl.WORKFLOWNAME == null)
            {
                MessageBox.Show("请选择需要修改的工作流!", "提示信息");
                return;
            }

            int id = 0;

            if (this.gridView1.RowCount <= 0)
            {
                return;
            }
            id = ToolHelper.ConvertToInt(this.gridView1.GetFocusedRowCellValue("SETNO").ToString());
            if (id < 1)
            {
                MessageBox.Show("请选择需要修改的工作流节点!", "提示信息");
                return;
            }
            else
            {
                workflowsetaddMdl.SETNO     = ToolHelper.ConvertToInt(this.gridView1.GetFocusedRowCellValue("SETNO").ToString());
                workflowsetaddMdl.NODENAME  = this.gridView1.GetFocusedRowCellValue("NODENAME").ToString();
                workflowsetaddMdl.NODEORDER = ToolHelper.ConvertToInt(this.gridView1.GetFocusedRowCellValue("NODEORDER").ToString());
                workflowsetaddMdl.BEGINTIME = ToolHelper.ConvertToDateTime(this.gridView1.GetFocusedRowCellValue("BEGINTIME").ToString());
                workflowsetaddMdl.ENDTIME   = ToolHelper.ConvertToDateTime(this.gridView1.GetFocusedRowCellValue("ENDTIME").ToString());

                frmWORKFLOWSETADD frm = new frmWORKFLOWSETADD(workflowsetaddMdl, StatusClass.Edit);
                frm.ShowDialog();
                ReadData(workflowsetaddMdl.WORKFLOWNAME);
            }
        }
コード例 #2
0
        /// <summary>
        /// 删除菜单
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void bbi_Delete_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            if (clbc_workflow.SelectedIndex < 0)
            {
                return;
            }
            decimal id           = 0;
            string  workflowname = clbc_workflow.Items[clbc_workflow.SelectedIndex].ToString();

            if (this.gridView1.RowCount <= 0)
            {
                return;
            }
            id = ToolHelper.ConvertToInt(this.gridView1.GetFocusedRowCellValue("SETNO").ToString());
            if (id < 1)
            {
                MessageBox.Show("请选择需要删除的工作流节点!", "提示信息");
                return;
            }
            else
            {
                if (MessageBox.Show("确定要删除该信息吗?", "提示信息", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
                {
                    deleteData(id);
                    ReadData(workflowname);
                }
                else
                {
                    return;
                }
            }
        }
コード例 #3
0
        /// <summary>
        /// Select Template Node
        /// </summary>
        /// <param name="filePath"></param>
        /// <param name="fileName"></param>
        void lucTemplatesExplorer_SelectTemplateNode(string filePath, string fileName)
        {
            if (this.DocumentHost.Items.Count > 0)
            {
                foreach (Control c in this.DocumentHost.Items)
                {
                    if (((ucBaseDocument)c).DocPath != null && ((ucBaseDocument)c).DocPath.ToLower() == filePath.ToLower())
                    {
                        ((ucBaseDocument)c).Activate();
                        return;
                    }
                }
            }

            if (filePath.IndexOf(".tt") > 0)
            {
                ucBaseDocument doc = new ucBaseDocument();
                doc.DocExt     = ".tt";
                doc.DocPath    = filePath;
                doc.DocType    = DocumentType.TemplateDocument;
                doc.DocChanged = false;
                doc.Title      = fileName;
                TextEditor tb = new TextEditor();
                tb.IsReadOnly = false;
                tb.Load(filePath);
                tb.SyntaxHighlighting = HighlightingManager.Instance.GetDefinition(ToolHelper.GetHighlightingByExtension(GetOutputExtension(tb.Text).Replace(".", string.Empty)));
                doc.Content           = tb;
                doc.LoadProperties(this.lucDocumentProperties);
                this.DocumentHost.Items.Add(doc);
                doc.Activate();
            }
        }
コード例 #4
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         try
         {
             if (Request.HttpMethod.ToLower() == "get")//获取用户端的传输方式(全转化为小写)是否是get传值
             {
                 string code = ToolHelper.GetPostOrGetPar(HttpContext.Current.Request.QueryString["code"], "");
                 FileHelper.logger.Info(ToolHelper.IPAddress() + "_" + code);
                 if (!string.IsNullOrEmpty(code))
                 {
                     HttpContext.Current.Session[WebLoginHelper.SESSION_TOKEN_CODE] = code;
                 }
                 else
                 {
                     FileHelper.logger.Error("没有code值");
                 }
             }
         }
         catch (Exception esg)
         {
             FileHelper.logger.Error(Convert.ToString(esg));
         }
     }
 }
コード例 #5
0
        public object GetGoodsList(string byOrderStatus, string sltOrderBy, string byReBackType)
        {
            string devSort     = string.Empty;
            string searchName  = ToolHelper.UrlParDecode(Request.QueryString["searchName"], "");
            string byTimeStart = ToolHelper.UrlParDecode(Request.QueryString["byTimeStart"], "");
            string byTimeEnd   = ToolHelper.UrlParDecode(Request.QueryString["byTimeEnd"], "");
            int    pageNow     = Convert.ToInt32(ToolHelper.UrlParDecode(Request.QueryString["pageNow"], "1"));

            if (sltOrderBy == "0")
            {
                devSort = " ORDER BY O.ShippingTime DESC ";
            }
            if (sltOrderBy == "1")
            {
                devSort = " ORDER BY R.CreatTime DESC ";
            }
            iptSearch.Value      = searchName;
            sltByTimeStart.Value = byTimeStart;
            sltByTimeEnd.Value   = byTimeEnd;
            int    pageSize    = 20;
            string suppliersID = WebLoginHelper.GetAdminSupplier();
            int    listCount   = new DB.BLL.MB_Bll(DBEnum.Slave).GetByPageReBackThirdOrderListCount(byTimeStart, byTimeEnd, suppliersID, byOrderStatus, byReBackType, searchName);
            string url         = "/web/thirdAdmin/reback_order.aspx?";

            url += "byTimeStart=" + ToolHelper.UrlParEncode(byTimeStart, "") + "&";
            url += "byTimeEnd=" + ToolHelper.UrlParEncode(byTimeEnd, "") + "&";
            url += "byReBackType=" + ToolHelper.UrlParEncode(byReBackType, "") + "&";
            url += "byOrderBy=" + ToolHelper.UrlParEncode(sltOrderBy, "") + "&";
            url += "searchName=" + ToolHelper.UrlParEncode(searchName, "") + "&";
            object        dt            = new DB.BLL.MB_Bll(DBEnum.Slave).GetByPageReBackThirdOrderList(byTimeStart, byTimeEnd, suppliersID, byOrderStatus, byReBackType, searchName, devSort, (pageNow - 1) * pageSize, pageSize);
            PageNavHelper pageNavHelper = new PageNavHelper(listCount, pageNow, pageSize, url + "pageNow=");

            pageNav.InnerHtml = pageNavHelper.ToHtml();
            return(dt);
        }
コード例 #6
0
        public void Tool7()
        {
            Engine.Initialize("Tool7", 960, 720, new Configuration()
            {
                EnabledCoreModules = CoreModules.Default | CoreModules.Tool
            });
            ToolHelper.Name = "Tool7";
            ToolHelper.Size = new Vector2F(250, 350);
            ToolHelper.AddComponent(new ColorButton());
            var childWindow = new ChildWindow()
            {
                Size = new Vector2I(200, 100)
            };

            childWindow.AddComponent(new InputInt1("Int", 0));
            childWindow.AddComponent(new Button("Button"));
            childWindow.AddComponent(new MultiRadioButton(("Radio1", 0), ("Radio2", 1), ("Radio3", 2)));
            ToolHelper.AddComponent(childWindow);
            while (Engine.DoEvents())
            {
                ToolHelper.Update();
                Engine.Update();
                if (Engine.Keyboard.GetKeyState(Key.Escape) == ButtonState.Push)
                {
                    break;
                }
            }
            Engine.Terminate();
        }
コード例 #7
0
        /// <summary>
        /// 删除按钮
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void sbt_Delete_Click(object sender, EventArgs e)
        {
            if (this.cbb_teacher.SelectedIndex == -1)
            {
                MessageBox.Show("请选择指导教师!", "提示信息");
                return;
            }

            int id = 0;

            if (this.gridView1.RowCount <= 0)
            {
                return;
            }
            id = ToolHelper.ConvertToInt(this.gridView1.GetFocusedRowCellValue("GUIDANCENO").ToString());
            if (id < 1)
            {
                MessageBox.Show("请选择需要删除的数据!", "提示信息");
                return;
            }
            else
            {
                if (MessageBox.Show("确定要删除该信息吗?", "提示信息", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
                {
                    deleteData(id);
                    readData(2);
                }
                else
                {
                    return;
                }
            }
        }
コード例 #8
0
        public object GetGoodsList(string orderStatus)
        {
            string devSort     = string.Empty;
            string searchName  = ToolHelper.UrlParDecode(Request.QueryString["searchName"], "");
            string byTimeStart = ToolHelper.UrlParDecode(Request.QueryString["byTimeStart"], "");
            string byTimeEnd   = ToolHelper.UrlParDecode(Request.QueryString["byTimeEnd"], "");
            int    pageNow     = Convert.ToInt32(ToolHelper.UrlParDecode(Request.QueryString["pageNow"], "1"));

            sltByTimeStart.Value = byTimeStart;
            sltByTimeEnd.Value   = byTimeEnd;
            iptSearch.Value      = searchName;
            int    pageSize    = 20;
            string suppliersID = WebLoginHelper.GetAdminSupplier();
            int    listCount   = 0;
            string url         = "/web/thirdAdmin/data_goodsInfo.aspx?";

            url += "byTimeStart=" + ToolHelper.UrlParEncode(byTimeStart, "") + "&";
            url += "byTimeEnd=" + ToolHelper.UrlParEncode(byTimeEnd, "") + "&";
            url += "byOrderStatus=" + ToolHelper.UrlParEncode(orderStatus, "") + "&";
            url += "searchName=" + ToolHelper.UrlParEncode(searchName, "") + "&";
            object dt = new DB.BLL.MB_Bll(DBEnum.Slave).GetByPageDataGoodsList(byTimeStart, byTimeEnd, suppliersID, orderStatus, searchName, (pageNow - 1) * pageSize, pageSize, out listCount);

            PageNavHelper pageNavHelper = new PageNavHelper(listCount, pageNow, pageSize, url + "pageNow=");

            pageNav.InnerHtml = pageNavHelper.ToHtml();
            return(dt);
        }
コード例 #9
0
ファイル: ObjectPool.cs プロジェクト: zhou8jie/kframework
    public ResShell GetResShell()
    {
        ResShell shell = null;

        if (m_unusedShells.Count == 0)
        {
            var res = GameObject.Instantiate(this.res);
            ToolHelper.IdentityLocalTransform(res.transform);
            shell = new ResShell(res);
            int id = res.GetInstanceID();
            m_shells[id] = shell;
        }
        else
        {
            shell = m_unusedShells.First.Value;
            m_unusedShells.RemoveFirst();
        }

        shell.res.transform.SetParent(null);
        shell.res.SetActive(true);
        if (shell.trail != null)
        {
            shell.trail.Clear();
        }
        return(shell);
    }
コード例 #10
0
ファイル: ObjectPool.cs プロジェクト: zhou8jie/kframework
    public GameObject GetObject()
    {
        GameObject ret   = null;
        ResShell   shell = null;

        if (m_unusedShells.Count == 0)
        {
            ret = GameObject.Instantiate(this.res);
            ToolHelper.IdentityLocalTransform(ret.transform);
            shell = new ResShell(ret);
            int id = ret.GetInstanceID();
            m_shells[id] = shell;
            Debug.LogWarning("object pool instantiate a obj in RUNTIME named : " + this.res);
        }
        else
        {
            shell = m_unusedShells.First.Value;
            ret   = shell.res;
            m_unusedShells.RemoveFirst();
        }

        ret.transform.SetParent(null);
        ret.SetActive(true);
        if (shell.trail != null)
        {
            shell.trail.Clear();
        }

        return(ret);
    }
コード例 #11
0
 private void ShapeProperties_Load(object sender, EventArgs e)
 {
     ToolHelper.ResetStatusTracker();
     Configs                  = ToolHelper.LoadConfiguration(ToolConfiguration.SHAPEPROPERTIES);
     txtSource.Text           = Configs.ContainsKey(ToolConfiguration.SOURCE) ? Configs[ToolConfiguration.SOURCE] : "";
     txtArchiveDirectory.Text = Configs.ContainsKey(ToolConfiguration.ARCHIVEDIRECTORY) ? Configs[ToolConfiguration.ARCHIVEDIRECTORY] : "";
 }
コード例 #12
0
        /// <summary>
        /// 发送登陆请求
        /// </summary>
        private static void T808_0x0011_Process()
        {
            //s SleepSendData(0);
            T808_0x0011 body = new T808_0x0011();

            body.setTerminalID(simNum);
            T808_MessageHeader mh = new T808_MessageHeader();

            // 获取终端对应的sim卡号
            mh.setSimNum(simNum);
            var cm = new CommonMessage <T808_0x0011>(body.getMessageID(), mh, body);

            //通过 clientSocket 发送数据
            try
            {
                var porto    = new T808_0x0011_Process <T808_0x0011>();
                var sendByte = porto.PackData(cm, key);
                clientSocket.Send(sendByte);

                WinFormHelper.ShowInfo(txtInfo, $"向服务器发送登陆消息:{ToolHelper.ByteConvertToHex(sendByte)}");
            }
            catch (Exception ex)
            {
                WinFormHelper.ShowInfo(txtInfo, $"发送登陆消息过程出现异常:{ex.Message},关闭连接!");
                EndConn();
            }
            WinFormHelper.ShowInfo(txtInfo, $"连接登陆消息发送完毕,保持连接!");
        }
コード例 #13
0
        private UserOPDRegister CreateOpdRegister(RequestConsultationInfoUpdateDTO model, UserOPDRegister entity, RequestConsultationDoctorDTO attendingDoctor)
        {
            if (entity == null)
            {
                entity = new UserOPDRegister();
            }

            entity.UserID       = model.CurrentOperatorUserID;
            entity.MemberID     = model.MemberID;
            entity.OPDType      = EnumDoctorServiceType.Consultation;
            entity.Fee          = model.Amount;
            entity.CreateUserID = model.CurrentOperatorUserID;
            entity.OPDBeginTime = "";
            entity.OPDEndTime   = "";
            entity.DoctorID     = attendingDoctor == null ? "" : attendingDoctor.DoctorID;
            entity.DoctorName   = attendingDoctor == null ? "" : attendingDoctor.DoctorName;
            entity.RegDate      = model.StartTime == null ? DateTime.Now : model.StartTime.Value;
            entity.MemberName   = model.MemberName;
            entity.Gender       = model.Gender;
            entity.Marriage     = model.Marriage;
            entity.Age          = ToolHelper.GetAgeFromBirth(model.Birthday);
            entity.IDNumber     = string.IsNullOrEmpty(model.IDNumber) ? "" : model.IDNumber;
            entity.IDType       = model.IDType;
            entity.Mobile       = model.Mobile;
            entity.Address      = model.PatientAddress;
            entity.Birthday     = model.Birthday;

            return(entity);
        }
コード例 #14
0
ファイル: UserMemberService.cs プロジェクト: radtek/XuHos
        /// <summary>
        /// 检查看诊患者信息
        /// </summary>
        /// <returns></returns>
        public bool CheckMemberProfileWithSubmitRequest(string MemberID, out string Reason)
        {
            Reason = "";

            if (string.IsNullOrEmpty(MemberID))
            {
                Reason = "没有设置就诊人";
            }
            else
            {
                var usermember = GetMemberInfo(MemberID);
                if (usermember == null)
                {
                    Reason = "就诊人不存在";
                }
                else if (string.IsNullOrWhiteSpace(usermember.MemberName))
                {
                    Reason = "就诊人姓名不能为空,请编辑";
                }
                else if (usermember.Birthday != "" && !ToolHelper.CheckBirthDay(usermember.Birthday))
                {
                    Reason = "就诊人出生日期不合法";
                }
                //else if (usermember.Gender == EnumUserGender.Other)
                //{
                //    Reason = "请指定就诊人性别";
                //}
                else
                {
                    return(true);
                }
            }

            return(false);
        }
コード例 #15
0
        public object GetGoodsList(string comfirmStatus, string byPayID)
        {
            string searchName  = ToolHelper.UrlParDecode(Request.QueryString["searchName"], "");
            string byTimeStart = ToolHelper.UrlParDecode(Request.QueryString["byTimeStart"], "");
            string byTimeEnd   = ToolHelper.UrlParDecode(Request.QueryString["byTimeEnd"], "");
            int    pageNow     = Convert.ToInt32(ToolHelper.UrlParDecode(Request.QueryString["pageNow"], "1"));

            iptSearch.Value      = searchName;
            sltByTimeStart.Value = byTimeStart;
            sltByTimeEnd.Value   = byTimeEnd;
            int     pageSize    = 20;
            decimal moneyAmount = 0;
            int     listCount   = new DB.BLL.MB_Bll(DBEnum.Slave).GetByPageUnusualRebackTradeListCount(byTimeStart, byTimeEnd, comfirmStatus, byPayID, searchName);
            string  url         = "/web/order/reback_trade.aspx?";

            url += "byTimeStart=" + ToolHelper.UrlParEncode(byTimeStart, "") + "&";
            url += "byTimeEnd=" + ToolHelper.UrlParEncode(byTimeEnd, "") + "&";
            url += "byComfirmStatus=" + ToolHelper.UrlParEncode(comfirmStatus, "") + "&";
            url += "byPayID=" + ToolHelper.UrlParEncode(byPayID, "") + "&";
            url += "searchName=" + ToolHelper.UrlParEncode(searchName, "") + "&";
            object        dt            = new DB.BLL.MB_Bll(DBEnum.Slave).GetByPageUnusualRebackTradeList(byTimeStart, byTimeEnd, comfirmStatus, byPayID, searchName, (pageNow - 1) * pageSize, pageSize, out moneyAmount);
            PageNavHelper pageNavHelper = new PageNavHelper(listCount, pageNow, pageSize, url + "pageNow=");

            pageNav.InnerHtml      = pageNavHelper.ToHtml();
            moneyAccount.InnerHtml = Convert.ToString(moneyAmount);
            return(dt);
        }
コード例 #16
0
 public String GetInstanceId()
 {
     if (_instanceId.IsNullOrEmpty())
     {
         lock (this)
         {
             if (_instanceId.IsNullOrEmpty())
             {
                 IAppDataFolder folder   = _serviceProvider.GetRequiredService <IAppDataFolder>();
                 string         id       = ToolHelper.NewShortId();
                 string         fileName = $"{_appName}.instance";
                 if (!folder.FileExists(fileName))
                 {
                     folder.CreateFile(fileName, id);
                 }
                 else
                 {
                     id = folder.ReadFile(fileName);
                 }
                 _instanceId = id;
             }
         }
     }
     return(_instanceId);
 }
コード例 #17
0
 private void Search_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Enter)
     {
         string key = search.Text;
         if (!string.IsNullOrEmpty(key))
         {
             view.ClearSelection();
             foreach (DataGridViewRow row in view.Rows)
             {
                 if (row.Index > Count)
                 {
                     string codeValue = ToolHelper.GetValue(row.Cells["code"].Value);
                     string nameValue = ToolHelper.GetValue(row.Cells["name"].Value);
                     if (codeValue.Contains(key) || nameValue.Contains(key))
                     {
                         row.Selected = true;
                         view.FirstDisplayedScrollingRowIndex = row.Index;
                         Count = row.Index;
                         return;
                     }
                 }
             }
             Count = -1;
         }
     }
 }
コード例 #18
0
        public JsonResult MoreDataList(int pageindex, int pagesize)
        {
            string jsonstr  = string.Empty;
            string txtQuery = string.Empty;//查询值
            string sql      = string.Empty;

            if (!string.IsNullOrEmpty(Request["txtQuery"]))
            {
                txtQuery = Request["txtQuery"].ToString();
                sql      = " and ProModel like ''%" + txtQuery + "%''";
            }
            int count = 3;
            var ds    = bll.GetProductList(pagesize, pageindex, sql);

            if (ds.Tables.Contains("ds") && ds.Tables[0] != null)
            {
                jsonstr = ToolHelper.DataTableToJson(ds.Tables[0]);
            }

            //if (ds.Tables.Contains("ds1") && ds.Tables[1] != null && ds.Tables[1].Rows.Count > 0)
            //{
            //    int.TryParse(ds.Tables[1].Rows[0]["totalcount"].ToString(), out count);
            //}

            return(Json(new { data = jsonstr, totalCount = count }, JsonRequestBehavior.AllowGet));
        }
コード例 #19
0
ファイル: DbFirstConfig.cs プロジェクト: kouweizhong/vita
        public DbFirstConfig(XmlDocument xmlConfig)
        {
            ProviderType     = xmlConfig.GetValue(ToolConfigNames.Provider);
            ConnectionString = xmlConfig.GetValue(ToolConfigNames.ConnectionString);
            Driver           = ToolHelper.CreateDriver(ProviderType, ConnectionString);
            Options          = ReflectionHelper.ParseEnum <DbFirstOptions>(xmlConfig.GetValue(ToolConfigNames.Options));
            Schemas          = xmlConfig.GetValueList(ToolConfigNames.Schemas);
            OutputPath       = xmlConfig.GetValue(ToolConfigNames.OutputPath);
            Namespace        = xmlConfig.GetValue(ToolConfigNames.Namespace);
            AppClassName     = xmlConfig.GetValue(ToolConfigNames.AppClassName);

            var autoValueSpec = xmlConfig.GetValue(ToolConfigNames.AutoValues);

            AutoValues = ParseAutoValuesSpec(autoValueSpec);
            var dataTypesSpec = xmlConfig.GetValue(ToolConfigNames.ForceDataTypes);

            ForceDataTypes = ParseDataTypesSpec(dataTypesSpec);
            IgnoreTables   = new StringSet();
            var ignoreList = xmlConfig.GetValue(ToolConfigNames.IgnoreTables);

            if (!string.IsNullOrWhiteSpace(ignoreList))
            {
                IgnoreTables.UnionWith(ignoreList.Split(new [] { ',', ';' }, StringSplitOptions.RemoveEmptyEntries));
            }
        }
コード例 #20
0
        public byte[] PackData(CommonMessage <T> cm, string key)
        {
            var stream = new MemoryStream();

            try
            {
                stream.WriteByte(0);
                var headByte     = ProtocolHelper.getHeaderBytes(cm);
                var getByteNumBt = ToolHelper.Int2Bytes2(9);
                headByte[2] = getByteNumBt[0];
                headByte[3] = getByteNumBt[1];
                stream.Write(headByte, 0, headByte.Length);
                var keyBt = ToolHelper.HexStringToByteArray(ToolHelper.StringToByHexString(key));
                stream.Write(keyBt, 0, keyBt.Length);
                stream.WriteByte(0);
                var end2 = ProtocolHelper.Check(ToolHelper.StreamToBytes(stream));//取得倒数第二位的校验位
                stream.WriteByte(end2);
                stream.WriteByte(0);
                var sendByte = ToolHelper.StreamToBytes(stream);
                sendByte    = ProtocolHelper.escapeData(sendByte);
                sendByte[0] = 126;
                sendByte[sendByte.Length - 1] = 126;
                stream.Dispose();
                return(sendByte);
            }
            catch
            {
                stream.Dispose();
                throw;
            }
        }
コード例 #21
0
        /// <summary>
        /// 查询数据
        /// </summary>
        private void readData()
        {
            if (this._workflowno > 0)
            {
                BLL.WORKFLOW   workflowbll = new BLL.WORKFLOW();
                Model.WORKFLOW workflowmdl = new Model.WORKFLOW();
                workflowmdl = workflowbll.GetModel(_workflowno);
                if (workflowmdl == null)   //新增工作流功能时
                {
                    blankData();
                }
                else                   //修改工作流功能时
                {
                    this.te_workflowname.Text = workflowmdl.WORKFLOWNAME;
                    this.de_createdate.Text   = ToolHelper.ConvertToString(workflowmdl.CREATEDATE);

                    if (workflowmdl.STATUS == 0)
                    {
                        this.cbb_status.Text = "未用";
                    }
                    else
                    {
                        this.cbb_status.Text = "在用";
                    }
                }
            }
        }
コード例 #22
0
        private object GetUserList(string byUserType)
        {
            string searchName = ToolHelper.UrlParDecode(Request.QueryString["searchName"], "");
            int    pageNow    = Convert.ToInt32(ToolHelper.UrlParDecode(Request.QueryString["pageNow"], "1"));

            iptSearch.Value = searchName;
            int    pageSize = 50;
            int    devCount = 0;
            string url      = "/web/admin/web_user_list.aspx?";

            url += "byScreenType=" + ToolHelper.UrlParEncode(byUserType, "") + "&";
            url += "searchName=" + ToolHelper.UrlParEncode(searchName, "") + "&";
            IEnumerable <dynamic> dt            = new DB.BLL.MB_Bll(DBEnum.Slave).GetByPageUserList(byUserType, searchName, (pageNow - 1) * pageSize, pageSize, out devCount);
            PageNavHelper         pageNavHelper = new PageNavHelper(devCount, pageNow, pageSize, url + "pageNow=");

            pageNav.InnerHtml = pageNavHelper.ToHtml();
            int i = 1 * pageSize * (pageNow - 1) + 1;

            return(dt.Select(info => {
                return new
                {
                    RowNo = i++,
                    info.UserName,
                    info.NickName,
                    info.Phone,
                    info.RegTime,
                    info.LastLogin,
                    info.CpyName,
                    info.NSex
                };
            }));;
        }
コード例 #23
0
        /// <summary>
        /// 异常处理
        /// </summary>
        /// <param name="message">错误信息</param>
        /// <param name="errorCode">错误号</param>
        /// <param name="e">错误源对象</param>
        protected void ResponseException(string message, string json, int errorCode, Exception e)
        {
            message = message.Replace("'", @"\'");
            context.Response.StatusCode        = 500;
            context.Response.StatusDescription = message;

            if (json != null && json != "")
            {
                json = "," + json;
            }
            StringBuilder errorStrBuilder = new StringBuilder();

            errorStrBuilder.Append("{success:false,error:'" + message + "'" + json);
            if (errorCode != 0)
            {
                errorStrBuilder.Append(" ,errorCode:" + errorCode.ToString());
            }
            if (e != null)
            {
                Logger.Log.Error(ToolHelper.GetLoginAccount() + "-----Exception:", e);

                errorStrBuilder.Append(" ,errorDescription:'" + e.Message.Replace("'", @"\'") + "'");
            }
            errorStrBuilder.Append("}");
            context.Response.Write(errorStrBuilder.ToString());
        }
コード例 #24
0
        private static TaskGroupTool MakeRealTool()
        {
            var pat    = ToolHelper.GetPersonalAccessToken();
            var client = new Client(pat);

            return(new TaskGroupTool(client, TestHelper.RealOrganization, TestHelper.RealProject));
        }
コード例 #25
0
        private void bbi_Edit_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            int id = 0;

            if (this.gridView1.RowCount <= 0)
            {
                return;
            }
            id = ToolHelper.ConvertToInt(this.gridView1.GetFocusedRowCellValue("EXECNO").ToString());
            if (id < 1)
            {
                MessageBox.Show("请选择需要修改成绩的数据!", "提示信息");
                return;
            }
            else
            {
                string termname          = this.gridView1.GetFocusedRowCellValue("TERMNAME").ToString();
                string workflowname      = this.gridView1.GetFocusedRowCellValue("WORKFLOWNAME").ToString();
                string nodename          = this.gridView1.GetFocusedRowCellValue("NODENAME").ToString();
                string stuno             = this.gridView1.GetFocusedRowCellValue("STUNO").ToString();
                string stuname           = this.gridView1.GetFocusedRowCellValue("STUNAME").ToString();
                string teachername       = this.gridView1.GetFocusedRowCellValue("TEANAME").ToString();
                string entname           = this.gridView1.GetFocusedRowCellValue("ENTNAME").ToString();
                frmSTU_MATERIALSEDIT frm = new frmSTU_MATERIALSEDIT(id, termname, workflowname, nodename, stuno, stuname, teachername, entname);
                frm.ShowDialog();
                readData();
            }
        }
コード例 #26
0
 private void txtRegPattern_MouseUp(object sender, MouseEventArgs e)
 {
     if (e.Button == System.Windows.Forms.MouseButtons.Left)
     {
         ToolHelper.TextBoxSelectionChanged(txtRegPattern, UIManager.Current.SetRowColumnIndex);
     }
 }
コード例 #27
0
        private void bbi_Delete_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            int id = 0;

            if (this.gridView1.RowCount <= 0)
            {
                return;
            }
            id = ToolHelper.ConvertToInt(this.gridView1.GetFocusedRowCellValue("NODENO").ToString());
            if (id < 1)
            {
                MessageBox.Show("请选择需要删除的工作节点!", "提示信息");
                return;
            }
            else
            {
                if (MessageBox.Show("确定要删除该信息吗?", "提示信息", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
                {
                    deleteData(id);
                    ReadData();
                }
                else
                {
                    return;
                }
            }
        }
コード例 #28
0
ファイル: Articles.xaml.cs プロジェクト: qq381795930/AnnHome
 private void btn_change_Click(object sender, RoutedEventArgs e)
 {
     if (pages < datas?.Posts.Count - 1)
     {
         pages++;
         Posts posts = datas?.Posts[pages];
         if (posts?.Attachments.Count > 0)
         {
             a_pic.Source = ToolHelper.showNetImage(posts?.Attachments?[0].Url);
         }
         a_content.NavigateToString(ToolHelper.ConvertExtendedASCII(posts?.Content));
         a_author.Content = "by : " + posts?.Author?.Nickname;
         a_title.Content  = posts?.Title;
         a_time.Content   = posts?.Date;
         a_url.Content    = posts?.Url;
     }
     else
     {
         pages = 0;
         Posts posts = datas?.Posts[pages];
         a_pic.Source = ToolHelper.showNetImage(posts?.Attachments?[0].Url);
         a_content.NavigateToString(ToolHelper.ConvertExtendedASCII(posts?.Content));
         a_author.Content = "by : " + posts?.Author?.Nickname;
         a_title.Content  = posts?.Title;
         a_time.Content   = posts?.Date;
         a_url.Content    = posts?.Url;
     }
 }
コード例 #29
0
        /// <summary>
        /// 保存方法
        /// </summary>
        private bool saveData()
        {
            BLL.STU_WORKFLOW stuworkflowBll = new BLL.STU_WORKFLOW();

            if (!ToolHelper.IsNumeric(this.te_grade.Text))
            {
                MessageBox.Show("成绩必须为数值!", "提示信息");
                return(false);
            }

            if (this.te_grade.Text.Length <= 0)
            {
                MessageBox.Show("成绩不能为空!", "提示信息");
                return(false);
            }

            float grade = ToolHelper.ConvertToFloat(this.te_grade.Text);

            if (grade < 0 || grade > 100)
            {
                MessageBox.Show("成绩不合法,请核查!", "提示信息");
                return(false);
            }

            BLL.ENTERPRISE_INFO   enterpriseBll = new BLL.ENTERPRISE_INFO();
            Model.ENTERPRISE_INFO enterpriseMdl = new Model.ENTERPRISE_INFO();

            if (this.cbb_ent.SelectedIndex != -1)
            {
                string entname = this.cbb_ent.Properties.Items[this.cbb_ent.SelectedIndex].ToString();

                enterpriseMdl = enterpriseBll.GetModel(entname);
                int entno = (int)enterpriseMdl.ENTNO;
                stuworkflowBll.Update(grade, _execno, entno);
            }
            else
            {
                string entname = this.cbb_ent.EditValue.ToString();
                if (entname.Length > 0)
                {
                    enterpriseMdl = enterpriseBll.GetModel(entname);
                    if (enterpriseMdl == null)
                    {
                        MessageBox.Show("该企业不存在,请添加该企业信息!", "提示信息");
                        return(false);
                    }
                    else
                    {
                        int entno = (int)enterpriseMdl.ENTNO;
                        stuworkflowBll.Update(grade, _execno, entno);
                    }
                }
                else
                {
                    stuworkflowBll.Update(grade, _execno);
                }
            }
            return(true);
        }
コード例 #30
0
        private void OnRoomJoined(BaseEvent evt)
        {
            Message message;

            Messages              = new Queue <Message>(maxMessages);
            IsConnected           = true;
            isConnecting          = false;
            haveConnectionProblem = false;

            var room         = (Room)evt.Params["room"];
            var roomVariable = room.GetVariable("messages");

            if (roomVariable == null)
            {
                return;
            }

            var array = JsonConvert.DeserializeObject <List <RoomVariable> >(roomVariable.GetStringValue());

            if (array == null)
            {
                return;
            }

            foreach (var item in array)
            {
                var time = new Lifetime();
                time.CreationTime = item.t * 1000;
                time.Duration     = -1000;
                time.CanExpire    = false;
                if (IsBannedUser(item.uid, time.CreationTime))
                {
                    continue;
                }

                unchecked
                {
                    message = new TextMessage()
                    {
                        Id       = new Id <Message>((int)(time.CreationTime / 1000)),
                        Sender   = new UserId(item.uid),
                        Text     = ToolHelper.Base64Decode(item.m),
                        Lifetime = time
                    };
                }

                if (Messages.Count >= maxMessages)
                {
                    Messages.Dequeue();
                }
                Messages.Enqueue(message);
            }

            if (Messages.Any())
            {
                MessageArrived(Messages.Last());
            }
            D.Log(LoggingTags.Chat, "Joined room is successfull:");
        }