Exemplo n.º 1
0
    private void Reqsub(int n)
    {
        if (!checkuser(tbx_EmpName.Text, tbx_EmpID.Text))
        {
            Mgr.ShowAlert(this, "姓名工号不匹配");
            return;
        }

        string s = " ";

        switch (cbx_ReqType.SelectedIndex)
        {
        //补卡
        case 0:
            if (!Mgr.CheckDate(tbx_time1.Text))
            {
                Mgr.ShowAlert(this, "时间格式错误");
                return;
            }
            s = "INSERT INTO Req VALUES(" + rkey.ToString( ) + ", " + Mgr.QuoteStr(Cardno.ToString( )) + ", getdate(), " + Mgr.QuoteStr(Session["USER_FULL_NAME"].ToString( )) + "," + Mgr.QuoteStr(tbx_ReqNote.Text) + "," + n.ToString() + "," + cbx_ReqType.SelectedValue.ToString( ) + ",null,null,null,null," + Mgr.QuoteStr(tbx_time1.Text) + ",null,null,null)";
            break;

        //请假
        case 1:
            if (!Mgr.CheckDate(tbx_time1.Text) || !Mgr.CheckDate(tbx_time2.Text))
            {
                Mgr.ShowAlert(this, "时间格式错误");
                return;
            }
            s = "INSERT INTO Req VALUES(" + rkey.ToString( ) + ", " + Mgr.QuoteStr(Cardno.ToString( )) + ", getdate(), " + Mgr.QuoteStr(Session["USER_FULL_NAME"].ToString( )) + "," + Mgr.QuoteStr(tbx_ReqNote.Text) + "," + n.ToString( ) + "," + cbx_ReqType.SelectedValue.ToString( ) + ",null,null," + Mgr.QuoteStr(tbx_time1.Text) + "," + Mgr.QuoteStr(tbx_time2.Text) + ",null,null,null," + cbx_RestType.SelectedValue.ToString( ) + ")";
            break;

        //手动修改工时
        case 2:
            if (!Mgr.CheckDate(tbx_date.Text))
            {
                Mgr.ShowAlert(this, "日期格式不正确");
                return;
            }
            if (!Mgr.CheckDoule(tbx_ZB.Text) || !Mgr.CheckDoule(tbx_JB.Text))
            {
                Mgr.ShowAlert(this, "工时不正确");
                return;
            }
            s = "INSERT INTO Req VALUES(" + rkey.ToString( ) + ", " + Mgr.QuoteStr(Cardno.ToString( )) + ", getdate(), " + Mgr.QuoteStr(Session["USER_FULL_NAME"].ToString( )) + "," + Mgr.QuoteStr(tbx_ReqNote.Text) + "," + n.ToString( ) + "," + cbx_ReqType.SelectedValue.ToString( ) + ",null,null,null,null," + Mgr.QuoteStr(tbx_date.Text) + "," + tbx_ZB.Text.ToString( ) + "," + tbx_JB.Text.ToString( ) + ",null)";

            break;
        }
        DBBase db = new DBBase( );

        if (db.SqlExec(s) == 1)
        {
            Mgr.ShowAlert(this, "添加成功");
            Response.Write("<script>window.location.href='ReqSubmit.aspx'</script>");
        }
        else
        {
            Mgr.ShowAlert(this, "添加失败");
        }
    }
Exemplo n.º 2
0
        public async Task <ActionResult> IndividualPaymentMethod(string id)
        {
            DomesticInvoicePaymentManager Mgr; bool offline;

            if (Request.IsAuthenticated && User.Identity.IsAuthenticated)
            {
                offline = false;
                Mgr     = new DomesticInvoicePaymentManager(Lang, UserManager.FindById(User.Identity.GetUserId()));
            }
            else
            {
                offline = true;
                Mgr     = new OfflineDomesticInvoicePaymentManager(Lang);
            }

            DomesticInvoice invoice = await Mgr.GetDomesticInvoice(id);

            if (invoice == null)
            {
                return(HttpNotFound());
            }

            if (invoice.IsPaid)
            {
                var resultMsg = IndividualPaidDomesticInvoice(id, offline);
                return(View("Warning", resultMsg));
            }

            ViewBag.Offline = offline;
            return(View(invoice));
        }
Exemplo n.º 3
0
        public override IEnumerator Start()
        {
            yield return(EB.Assets.LoadAsync("_GameAssets/Res/Prefabs/UIPrefabs/MainHudUI", typeof(GameObject), o =>
            {
                if (o)
                {
                    var mainhud = GameObject.Instantiate(o) as GameObject;
                    mainhud.name = "MainHudUI";
                    GameObject camera = GameObject.Find("DownloadHudUI/OrthoCam");
                    if (camera != null)
                    {
                        camera.transform.SetParent(mainhud.transform);
                    }
                }
            }));

            //切到GameStateStart状态 transform to GameStateStart
            Mgr.SetGameState <GameStateStart>();

            //加载UIHelper全局的ui预设 Load UIHelper
            UIStack.Instance.LoadUIHelper();
            //加载StoryPrefab
            LoadStoryPrefab();
            yield break;
        }
Exemplo n.º 4
0
 // Use this for initialization
 void Start()
 {
     player   = Mgr.getInstance().player;
     animator = this.GetComponent <Status>().model.GetComponent <Animator>();
     move     = this.GetComponent <Move>();
     randomPos();
 }
Exemplo n.º 5
0
 virtual protected void OnClose(List <Exception> exceptions)
 {
     if (Mgr != null)
     {
         Mgr.OnConnectionClosed(this, exceptions);
     }
 }
Exemplo n.º 6
0
        /// <summary>
        /// 드로우에리어 페인트 오버라이드
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void DrawArea_Paint(object sender, System.Windows.Forms.PaintEventArgs e)
        {
            SolidBrush brush = new SolidBrush(Color.FromArgb(255, 255, 255));

            e.Graphics.FillRectangle(brush, this.ClientRectangle);

            if (Mgr.Flolist.Count > 0 || Mgr.Gudcon != null || Mgr.Gudsrt != null)
            {
                FLOObj o = Mgr.Flolist.GetFLOSttObj();

                if (o != null && o.Drwobj == null)
                {
                    o.Drwobj = new DRWStt(o, this.ClientRectangle.Right, this.ClientRectangle.Top);
                }

                Mgr.Draw(e.Graphics);
            }

            if (this.Mgr.Gudsrt.GridpointX != 1)
            {
                ControlPaint.DrawGrid(e.Graphics, this.ClientRectangle, new Size((this.Mgr.Gudsrt.GridpointX), (this.Mgr.Gudsrt.GridpointY)), Color.Gray);
            }

            this.owner.statusBar1.Text = this.Mgr.Gudsrt.Seldraw.ToString();

            brush.Dispose();
        }
Exemplo n.º 7
0
 virtual protected void OnClosing()
 {
     if (Mgr != null)
     {
         Mgr.OnConnectionClosing(this);
     }
 }
Exemplo n.º 8
0
    private void GetSelectData()
    {
        DBBase db = new DBBase( );

        if (!Mgr.CheckDate(BeginTime.Text) || !Mgr.CheckDate(EndTime.Text))
        {
            Mgr.ShowAlert(this, "时间格式不正确");
            return;
        }

        string s = "SELECT top 100 d2.chinesename AS 姓名,d2.employeecode AS 工号, d1.CheckDate AS 日期, d1.OnDutytime1 AS 签到1 , d1.OffDutytime1 AS 签退1, d1.OnDutytime2 AS 签到2 , d1.OffDutytime2 AS 签退2,d1.OnDutytime3 AS 签到3 , d1.OffDutytime3 AS 签退3, d1.YTNote AS 异常, d1.RWT AS 正班 , d1.ROT AS 加班 , d1.SWT AS 需正, d1.OWT AS 需加  FROM OnOffDutyData d1 ";

        s += "INNER JOIN employeemsg d2 ON d1.EmployeeID = d2.Rkey ";
        s += "  LEFT JOIN class d4 ON d1.ClassID = d4.RKey ";
        s += " LEFT JOIN resttypemsg d3 ON d1.RestType = d3.rkey ";
        s += " INNER JOIN datadepartment d5 ON d2.departmentid = d5.RKey ";
        s += " WHERE d1.CheckDate BETWEEN " + Mgr.QuoteStr(BeginTime.Text) + " AND " + Mgr.QuoteStr(EndTime.Text);
        if (!string.IsNullOrEmpty(tbx_GH.Text))
        {
            s += " AND d2.employeecode = " + Mgr.QuoteStr(tbx_GH.Text);
        }
        s += " AND d5.RKey=" + cbx_depart.SelectedValue.ToString( );
        DataTable dt = new DataTable( );

        dt = db.SqlOpen(s);
        NaturalView.DataSource = dt;
        NaturalView.DataBind();
    }
Exemplo n.º 9
0
 virtual protected void OnOpen()
 {
     if (Mgr != null)
     {
         Mgr.OnConnectionOpened(this);
     }
 }
Exemplo n.º 10
0
    private void GetData()
    {
        if (!Mgr.CheckLogin(this, 3))
        {
            return;
        }

        string s = "SELECT d1.rkey ,d2.employeecode as 工号, d2.chinesename as 姓名,  ";

        s += " (case reqstate when 0 then '未提交' when 1 then '已提交' when 2 then '已审核' when 3 then '退回' end) as 状态, reqinfo as 备注, reqperson as 提交人,";
        s += " reqtime as 提交时间, (case reqtype when 0 then '补卡' when 1 then '请假' when 2 then '修改工时' end ) as 类型, req_cardtime as 时间, req_starttime as 始,";
        s += " req_endtime as 终, zbhour as 正班, jbhour as 加班, dealperson as 受理人, dealtime as 受理时间 , d1.Cardno, d1.employeeid , d1.AskForLeaveRK, d3.LeaveType";
        s += " FROM Req d1 INNER JOIN employeemsg d2 ON d1.employeeid = d2.rkey ";
        s += " LEFT JOIN AskForLeave d3 ON d1.AskForLeaveRK = d3.RKey ";
        s += " WHERE Reqtime BETWEEN " + Mgr.QuoteStr(BeginTime.Text) + " AND ";
        s += " dateadd(day,2," + Mgr.QuoteStr(EndTime.Text) + ") " + " AND ReqState = " + cbx_type.SelectedValue.ToString( );
        if (!string.IsNullOrEmpty(tbxEmployID.Text))
        {
            if (!Mgr.CheckInt(tbxEmployID.Text))
            {
                Mgr.ShowAlert(this, "工号只能是数字!");
                return;
            }
            s += " AND d2.employeecode=" + tbxEmployID.Text;
        }
        s += " ORDER BY 工号";
        DBBase    db = new DBBase( );
        DataTable tb = new DataTable( );

        tb = db.SqlOpen(s);
        ReqDataView.DataSource = tb;
        ReqDataView.DataBind( );
    }
Exemplo n.º 11
0
        private IEnumerator WaitForReady()
        {
            DateTime t = DateTime.Now;

            EB.Debug.Log("WaitForReady=====>_{0}", t.ToString("yyyy-MM-dd hh:mm:ss fff"));
            while (!HudLoadManager.IsReady)
            {
                if (!HudLoadManager.IsLoadingConfig)
                {
                    HudLoadManager.LoadConfigAsync();
                }
                yield return(null);
            }
            LoadingLogic.AddCustomProgress(5);
            while (!SceneLoadManager.IsReady)
            {
                if (!SceneLoadManager.IsLoadingConfig)
                {
                    SceneLoadManager.LoadConfigAsync();
                }
                yield return(null);
            }
            LoadingLogic.AddCustomProgress(5);

            Mgr.SetGameState <GameStateLoadGame>();

            t = DateTime.Now;
            EB.Debug.Log("<=====WaitForReady_{0}", t.ToString("yyyy-MM-dd hh:mm:ss fff"));
        }
Exemplo n.º 12
0
        public async Task <ActionResult> IndividualBankTransfer(HttpPostedFileBase BankFile, string id)
        {
            try
            {
                DomesticInvoicePaymentManager Mgr; bool offline;
                if (Request.IsAuthenticated && User.Identity.IsAuthenticated)
                {
                    offline = false;
                    Mgr     = new DomesticInvoicePaymentManager(Lang, UserManager.FindById(User.Identity.GetUserId()));
                }
                else
                {
                    offline = true;
                    Mgr     = new OfflineDomesticInvoicePaymentManager(Lang);
                }
                ViewBag.Offline = offline;

                var result = await Mgr.UploadBankTransferFile(BankFile, id);

                if (result.IsSuccessStatusCode)
                {
                    var successMsg = IndividualSuccessBankTransferFileUploadMsg(id, offline);
                    return(View("Success", successMsg));
                }
            }
            catch (Exception ex)
            {
            }

            var failMsg = IndividualFailBankTransferFileUploadMsg(id);

            return(View("Failure", failMsg));
        }
Exemplo n.º 13
0
    protected void Btn_login_Click1(object sender, EventArgs e)
    {
        string username = Tbx_userID.Text;
        string pwd      = Tbx_userpwd.Text;

        if (string.IsNullOrEmpty(username) || string.IsNullOrEmpty(pwd))
        {
            Mgr.ShowAlert(this, "用户名或密码为空");
            return;
        }

        if (!Mgr.CheckStr(username) || !Mgr.CheckStr(pwd))
        {
            Mgr.ShowAlert(this, "包含非法字符");
            return;
        }

        if (Mgr.Login(this, Tbx_userID.Text, Tbx_userpwd.Text))
        {
            Response.Redirect("Navigate.aspx");
        }
        else
        {
            //Lbl_message.Text = "用户名或密码错误";
        }
    }
Exemplo n.º 14
0
        public void TestO2OInverse()
        {
            Dept d1 = new Dept()
            {
                Name = "D1"
            };
            Dept d2 = new Dept()
            {
                Name = "D2"
            };
            Mgr m1 = new Mgr()
            {
                Name = "M1"
            };
            Mgr m2 = new Mgr()
            {
                Name = "M2"
            };

            d1.Mgr  = m1;
            m1.Dept = d2;
            d2.Mgr  = m2;
            m2.Dept = d1;
            Debug.WriteLine("---Begin Save---");
            Session.SaveOrUpdate(d1);
            Session.SaveOrUpdate(d2);
            Session.SaveOrUpdate(m1);
            Session.SaveOrUpdate(m2);
            Debug.WriteLine("---Begin Flush---");
            Session.Flush();
        }
        /// <summary>
        /// Create an enrollee object matching a unifying format and store it
        /// into the database. Unifying format means no extra characters in
        /// ssn, homephone, or mobilephone
        /// </summary>
        /// <param name="firstName"></param>
        /// <param name="lastName"></param>
        /// <param name="ssn"></param>
        /// <param name="mailingAddr"></param>
        /// <param name="billingAddr"></param>
        /// <param name="pin"></param>
        /// <param name="contactInfo"></param>
        public void CreatePrimaryEnrollee(
            string firstName,
            string lastName,
            string ssn,
            string mailingAddr,
            string billingAddr,
            string pin,
            Contact contactInfo)
        {
            // the ssn can come in a variety formats and I need to make sure
            // they all just end up in the format NNNNNNNNN
            var transformedSSN    = ssn.Replace(" ", "").Replace("-", "");
            var transformedHome   = TransformPhone(contactInfo.homePhone);
            var transformedMobile = TransformPhone(contactInfo.mobilePhone);

            this.PrimaryEnrollee = new PrimaryEnrollee(pin)
            {
                BillingAddr = billingAddr,
                Email       = contactInfo.email,
                FirstName   = firstName,
                HomePhone   = transformedHome,
                LastName    = lastName,
                MailingAddr = mailingAddr,
                MobilePhone = transformedMobile,
                SSN         = transformedSSN
            };
            insertId = Mgr.SaveEnrollee(this.PrimaryEnrollee);
        }
Exemplo n.º 16
0
 /// <summary>
 /// Change the enrollee's plan to the new Plan that they selected.
 /// </summary>
 /// <param name="change"></param>
 public void ChangeCurrent(InsurancePlan change)
 {
     if (!MultiplePlans)
     {
         this.CurrentPlan.ChangeTo(change);
         Mgr.SaveEnrolleePlan(this.CurrentPlan);
     }
 }
Exemplo n.º 17
0
 protected void btn_Save_Click(object sender, EventArgs e)
 {
     if (!Mgr.CheckLogin(this, 2))
     {
         return;
     }
     Reqsub(0);
 }
Exemplo n.º 18
0
        public static void Start()
        {
            Log.Info("热更新层启动!");

            Mgr.Initialize();
            //开始热更新层入口流程
            Mgr.Procedure.StartProcedure <ProcedureHotfix_Preload>();
        }
Exemplo n.º 19
0
 static public void Stop()
 {
     Log.Success("WorldMgr", "Stop");
     foreach (RegionMgr Mgr in _Regions)
     {
         Mgr.Stop();
     }
 }
Exemplo n.º 20
0
 void OnTriggerEnter(Collider aaa)
 {
     Debug.Log("吃道具");
     if (item >= 0)
     {
         Mgr.getInstance().users[0].packages.addFree(item);
     }
 }
Exemplo n.º 21
0
        public override void GetList()
        {
            AddTeam();
            var id = AddTeam();

            Mgr.Delete(id);
            Assert.AreEqual(1, Mgr.GetItems().Count());
        }
Exemplo n.º 22
0
        public ModifyPlanController(int EnrolleeId)
        {
            this.AvailablePlans = Mgr.GetPlanByPrimary(EnrolleeId);

            if (this.AvailablePlans.Count() == 1)
            {
                this.CurrentPlan = this.AvailablePlans.ElementAt(0);
            }
        }
    private void Awake()
    {
        coll2D       = GetComponent <BoxCollider2D>();
        rand         = GameObject.Find("Score").GetComponent <WeightedRandom>();
        scoreManager = GameObject.Find("Score").GetComponent <ScoreManager>();
        mgr          = GameObject.Find("Spawner").GetComponent <Mgr>();

        Debug.Log(collHeightHalf);
    }
Exemplo n.º 24
0
 public void Blink(int repeat = 1, int delay = 1000)
 {
     for (int i = 0; i < repeat; i++)
     {
         Mgr.SetDigitalPin(_ledBuiltInPinNumber, true);
         System.Threading.Thread.Sleep(delay);
         Mgr.SetDigitalPin(_ledBuiltInPinNumber, false);
     }
 }
Exemplo n.º 25
0
 protected void Page_Load(object sender, EventArgs e)
 {
     Mgr.CheckLogin(this, 1);
     if (!IsPostBack)
     {
         Years.Text = YearTime.Text;
         GetAllDepart( );
     }
 }
Exemplo n.º 26
0
 public static GameSkill get(int id)
 {
     if (mMgr != null)
     {
         return(mMgr.get(id));
     }
     mMgr = new Mgr();
     return(mMgr.get(id));
 }
Exemplo n.º 27
0
 protected void Page_Load(object sender, EventArgs e)
 {
     Mgr.CheckLogin(this, 3);
     if (!IsPostBack)
     {
         BeginTime.Text = System.DateTime.Now.Date.ToString("yyyy-MM-dd");
         EndTime.Text   = System.DateTime.Now.AddDays(1).ToString("yyyy-MM-dd");
     }
 }
        /// <summary>
        /// Checks if an enrollee with the given email and pin is in the
        /// database and that the pin is correct.
        /// </summary>
        /// <param name="email"></param>
        /// <param name="pin"></param>
        /// <returns></returns>
        public Enrollee LoginEnrollee(string email, string pin)
        {
            Enrollee enrollee = Mgr.GetEnrolleeByEmail(email);

            // since enrollee can be null we need to check if it is equal to true
            return(((enrollee.Email.Equals("guest@guest") &&
                     email.Equals("guest@guest") &&
                     pin == enrollee.Pin) ||
                    enrollee?.Login(email, pin) == true) ? enrollee: null);
        }
Exemplo n.º 29
0
    public GameObject newIcon(Icon icon, Transform parent)
    {
        var iconObj = Instantiate(Mgr.getInstance().iconPrefab, parent);
        var iconImg = iconObj.GetComponent <Image>();

        //var icon = iconObj.GetComponent<Icon>();
        //icon.id = id;
        iconImg.sprite = Mgr.getInstance().icons[icon.item.assetid];
        return(iconObj);
    }
Exemplo n.º 30
0
    protected void Btn_PostBack_Click(object sender, EventArgs e)
    {
        if (!Mgr.CheckLogin(this, 2))
        {
            return;
        }
        bool   b = false;
        string errstr = "", s;
        int    nSucc  = 0;
        int    ntotal = 0;

        for (int nn = 0; nn < ReqDataView.Rows.Count; nn++)
        {
            GridViewRow row  = ReqDataView.Rows[nn];
            Control     ctrl = row.FindControl("CheckBox1");
            if ((ctrl as CheckBox).Checked)
            {
                ntotal++;
                int n = row.RowIndex;
                //TableCellCollection cell = row.Cells;
                int    ReqRkey = Convert.ToInt32(ReqDataView.DataKeys[n].Values[0].ToString( ));
                int    nState  = Mgr.GetReqState(ReqRkey);
                string estr    = "";
                if (!Mgr.CheckState(nState, new int[] { 1 }, ref estr))
                {
                    errstr += "第 " + ntotal.ToString( ) + " 条 " + estr + "\\n";
                }
                else
                {
                    s = "UPDATE Req SET reqstate = 3 WHERE RKey= " + ReqRkey.ToString( );
                    DBBase db = new DBBase( );
                    if (db.SqlExec(s) <= 0)
                    {
                        errstr += "第 " + ntotal.ToString( ) + "条 返回0,操作失败 \\n";
                    }
                    else
                    {
                        nSucc++;
                        errstr += "第 " + ntotal.ToString( ) + "条 操作成功 \\n";
                    }
                }
                b = true;
            }
        }
        if (!b)
        {
            errstr = "数据为空";
        }
        else
        {
            errstr += "总共: " + ntotal.ToString( ) + "条    成功:" + nSucc.ToString( ) + "条";
        }
        Mgr.ShowAlert(this, errstr);
        GetData( );
    }
    private void BindDropDowns()
    {
        // Protfolio
        Portfolio objPortfolio = new Portfolio();
        ddPortfolio.DataSource = objPortfolio.GetPortfolio();
        ddPortfolio.DataValueField = "PortfolioId";
        ddPortfolio.DataTextField = "Name";
        ddPortfolio.DataBind();

        // Owner
        Owner objowner = new Owner();
        ddowner.DataSource = objowner.GetOwner();
        ddowner.DataValueField = "id";
        ddowner.DataTextField = "owner";
        ddowner.DataBind();

        //MGR
        Mgr objmgr = new Mgr();
        ddmgr.DataSource = objmgr.GetMgr();
        ddmgr.DataValueField = "id";
        ddmgr.DataTextField = "mgr";
        ddmgr.DataBind();

        //Unit
        //chkunit.DataSource = objunit.GetUnits();
        //chkunit.DataValueField = "Unitid";
        //chkunit.DataTextField = "title";
        //chkunit.DataBind();
    }