Exemplo n.º 1
0
        private  void RefuseConTemp_Click(object sender, EventArgs e)
        {
            if (this.Reason.Text == "备注:同意时此栏可不填,拒绝时需填写理由"
            || string.IsNullOrEmpty(this.Reason.Text))
            {
                MessageBox.Show("需填写拒绝理由!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                //return;
            }
            else
            {
                SignatureDetail sd = new SignatureDetail();
                sd.ConId = this.ConTempId.Text;
                sd.EmpId = UserHelper.UserInfo.Id;
                sd.Remark = this.Reason.Text;
                sd.Result = -1;

                string result =  _sc.SignDetail(sd);
                if (result == Response.INSERT_SIGN_DETAIL_SUCCESS.ToString())
                {
                    this.DialogResult = DialogResult.OK;
                }
                else
                {
                    MessageBox.Show("处理失败,请重新处理!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                }

            }
        }
Exemplo n.º 2
0
        ///// <summary>
        ///// 查询会签单信息
        ///// </summary>
        ///// <param name="Id"></param>
        ///// <returns></returns>
        //public HDJContract GetHDJContract(string Id)
        //{
        //        try
        //        {
        //            SocketMessage sm = new SocketMessage(Request.GET_HDJCONTRACT_REQUEST, Id);
        //            ClientSocket.Send(Encoding.UTF8.GetBytes(sm.Package));

        //            recLength = ClientSocket.Receive(recivebuffer);
        //            string recMsg = Encoding.UTF8.GetString(recivebuffer, 0, recLength);
        //            string[] Msg = recMsg.Split(SocketMessage.DEFAULT_SEPARATOR);

        //            if (Msg[0] == Response.GET_HDJCONTRACT_SUCCESS.ToString())
        //            {
        //                HDJContract list = new HDJContract();
        //                list = JsonConvert.DeserializeObject<HDJContract>(Msg[2]);

        //                return list;
        //            }
        //            else
        //            {
        //                Logging.AddLog("查询会签单信息失败!");
        //                return null;
        //            }
        //        }
        //        catch
        //        {
        //            Logging.AddLog("查询会签单信息失败(服务器连接中断)!");
        //            return null;
        //        }
        //}
        
        /// <summary>
        /// 签单签字情况
        /// </summary>
        /// <param name="sd"></param>
        /// <returns></returns>
        public string SignDetail(SignatureDetail sd)
        {
            //return Task.Factory.StartNew(() =>
            {
                try
                {
                    SocketMessage sm = new SocketMessage(Request.INSERT_SIGN_DETAIL_REQUEST, sd);
                    ClientSocket.Send(Encoding.UTF8.GetBytes(sm.Package));

                    recLength = ClientSocket.Receive(recivebuffer);
                    string recMsg = Encoding.UTF8.GetString(recivebuffer, 0, recLength);
                    string[] Msg = recMsg.Split(SocketMessage.DEFAULT_SEPARATOR);

                    if (Msg[0] == Response.INSERT_SIGN_DETAIL_SUCCESS.ToString())
                    {
                        Logging.AddLog("签单签字成功!");
                    }
                    else
                    {
                        Logging.AddLog("签单签字失败!");
                    }
                    return Msg[0];
                }
                catch
                {
                    Logging.AddLog("签单签字失败(服务器连接中断)!");
                    return "服务器连接中断";
                }
            //});
            }
        }
Exemplo n.º 3
0
        private  void AgreeConTemp_Click(object sender, EventArgs e)
        {
            SignatureDetail sd = new SignatureDetail();
            sd.ConId = this.ConTempId.Text;
            sd.EmpId = UserHelper.UserInfo.Id;

            if (this.Reason.Text == "备注:同意时此栏可不填,拒绝时需填写理由")
            {
                sd.Remark = "未填";
            }
            else
            {
                sd.Remark = this.Reason.Text.Trim();
            }
            sd.Result = 1;

            string result =  _sc.SignDetail(sd);
            if (result == Response.INSERT_SIGN_DETAIL_SUCCESS.ToString())
            {
                this.DialogResult = DialogResult.OK;
            }
            else
            {
                MessageBox.Show("处理失败,请重新处理!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }