Example #1
0
        public ActionResult Check()
        {
            string url_id = Request.QueryString["id"];

            FangkeService.HVS010TB hvs010tb = new FangkeService.HVS010TB();
            hvs010tb.url_id   = url_id;
            hvs010tb.vs_count = 0;
            FangkeServiceSoapClient fangkeService = new FangkeServiceSoapClient();
            DataTable dt = fangkeService.SearchHVS010TB(hvs010tb);

            Models.HVS010TB vs = new Models.HVS010TB();
            if (dt.Rows.Count > 0)
            {
                vs.vs_company = dt.Rows[0]["vs_company"].ToString();
                vs.vs_count   = dt.Rows[0]["vs_count"].ToString();
                vs.vs_date    = dt.Rows[0]["vs_date"].ToString();
                vs.vs_nm      = dt.Rows[0]["vs_nm"].ToString();
                vs.vs_note    = dt.Rows[0]["vs_note"].ToString();
                vs.vs_time    = dt.Rows[0]["vs_time"].ToString();
                vs.ck_state   = dt.Rows[0]["ck_state"].ToString();
                vs.dept_nm    = dt.Rows[0]["dept_nm"].ToString();
                vs.emp_nm     = dt.Rows[0]["emp_nm"].ToString();
                vs.emp_zw     = dt.Rows[0]["emp_zw"].ToString();
                vs.car_no     = dt.Rows[0]["car_no"].ToString();
            }

            return(View(vs));
        }
Example #2
0
        public ActionResult Check(FormCollection collection)
        {
            string url_id = Request.QueryString["id"];

            FangkeService.HVS010TB hvs010tb = new FangkeService.HVS010TB();
            hvs010tb.url_id   = url_id;
            hvs010tb.vs_count = 0;
            FangkeServiceSoapClient fangkeService = new FangkeServiceSoapClient();
            //审核
            DataTable dt = fangkeService.CheckHVS010TB(hvs010tb);

            //推送信息
            if (dt.Rows.Count > 0)
            {
                string agentid = ConfigurationManager.AppSettings["AgentIdForFangke"];
                SendMessageServiceSoapClient sendMessageService = new SendMessageServiceSoapClient();
                sendMessageService.FangKePushMessage(url_id, agentid, "Y", "check_succeed");
            }
            //审核完成重新查询
            dt = null;
            dt = fangkeService.SearchHVS010TB(hvs010tb);
            Models.HVS010TB vs = new Models.HVS010TB();
            if (dt.Rows.Count > 0)
            {
                vs.vs_company = dt.Rows[0]["vs_company"].ToString();
                vs.vs_count   = dt.Rows[0]["vs_count"].ToString();
                vs.vs_date    = dt.Rows[0]["vs_date"].ToString();
                vs.vs_nm      = dt.Rows[0]["vs_nm"].ToString();
                vs.vs_note    = dt.Rows[0]["vs_note"].ToString();
                vs.vs_time    = dt.Rows[0]["vs_time"].ToString();
                vs.ck_state   = dt.Rows[0]["ck_state"].ToString();
                vs.dept_nm    = dt.Rows[0]["dept_nm"].ToString();
                vs.emp_nm     = dt.Rows[0]["emp_nm"].ToString();
                vs.emp_zw     = dt.Rows[0]["emp_zw"].ToString();
                vs.car_no     = dt.Rows[0]["car_no"].ToString();
            }
            return(View(vs));
        }
Example #3
0
        public ActionResult Add(FormCollection collection)
        {
            FangkeServiceSoapClient fangkeService = new FangkeServiceSoapClient();

            FangkeService.HVS010TB hvs010tb = new FangkeService.HVS010TB();
            hvs010tb.dept_nm = "";
            hvs010tb.emp_nm  = collection["emp_nm"];
            hvs010tb.emp_no  = Request.QueryString["id"];
            hvs010tb.emp_zw  = "";
            string ss = System.Guid.NewGuid().ToString();
            string s2 = ss.Substring(24, 12);

            hvs010tb.url_id     = s2;
            hvs010tb.use_no     = Request.QueryString["id"];
            hvs010tb.vs_btime   = collection["vs_btime"];
            hvs010tb.vs_company = collection["vs_company"];
            hvs010tb.vs_count   = int.Parse(collection["vs_count"]);
            hvs010tb.vs_date    = collection["vs_date"];
            hvs010tb.vs_etime   = "17:00";
            hvs010tb.vs_nm      = collection["vs_nm"];
            hvs010tb.vs_note    = collection["vs_note"];
            hvs010tb.car_no     = collection["car_no"];
            DataTable dt = fangkeService.AddHVS010TB(hvs010tb);

            Message message = new Message();

            message.Msg_cd   = dt.Rows[0]["msg_cd"].ToString();
            message.Msg_text = dt.Rows[0]["msg_text"].ToString();
            //登记成功后推信息
            if (message.Msg_cd == "Y")
            {
                string agentid = ConfigurationManager.AppSettings["AgentIdForFangke"];
                SendMessageServiceSoapClient sendMessageService = new SendMessageServiceSoapClient();
                Error error = sendMessageService.FangKePushMessage(s2, agentid, "fangke", "insert_succeed");
            }

            return(View(message));
        }