Пример #1
0
        // 已办列表的单击事件
        private void DoneListView_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.RowIndex < 0)
            {
                return;
            }

            if (e.ColumnIndex == 1)
            {
                string      id  = this.DoneListView.Rows[e.RowIndex].Cells[0].Value.ToString();
                SignConTemp sct = new SignConTemp(_sc, id, 5);
                sct.ShowDialog();
            }
        }
Пример #2
0
        // 待签字列表的单机事件
        private void ToDoListView_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.RowIndex < 0)
            {
                return;
            }
            if (e.ColumnIndex == 1)
            {
                string      Id  = this.ToDoListView.Rows[e.RowIndex].Cells[0].Value.ToString();
                SignConTemp sct = new SignConTemp(_sc, Id, 4);
                sct.ShowDialog();


                if (sct.DialogResult == DialogResult.OK)
                {
                    sct.Close();
                    ///[BUG NO.2015-07-05 17:52]

                    BindUnsignData(true);

                    // 用户签字后,待办列表数目减少1,已办列表数目增加1
                    MainWindow mw = (MainWindow)this.MdiParent;
                    foreach (TreeNode t in mw.treeView1.Nodes)
                    {
                        if (t.Text.Contains("签字管理("))
                        {
                            int count = Convert.ToInt32(t.Text.Split('(')[1].Split(')')[0]);
                            if (count - 1 == 0)
                            {
                                t.Text          = "签字管理";
                                t.Nodes[0].Text = "待办列表";
                            }
                            else
                            {
                                t.Text          = "签字管理(" + (count - 1) + ")";
                                t.Nodes[0].Text = "待办列表(" + (count - 1) + ")";
                            }
                        }
                    }
                    //BindSignedData(true);
                }
            }
        }
Пример #3
0
        // 待签字列表的单机事件
        private void ToDoListView_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            //用于判断是否签单同意  用于刷新列表
            bool ifok = false;;

            if (e.RowIndex < 0)
            {
                return;
            }
            if (e.ColumnIndex == 1)
            {
                string Id = this.ToDoListView.Rows[e.RowIndex].Cells[0].Value.ToString();
                //这里也要区分模版类型
                string type = Id[1].ToString() + Id[2].ToString();
                if (type == "内例" || type == "内专")
                {
                    //显示内河的模版
                    SignConTempInside sct = new SignConTempInside(_sc, Id, 4);
                    sct.ShowDialog();
                    if (sct.DialogResult == DialogResult.OK)
                    {
                        sct.Close();
                        ifok = true;
                    }
                }

                if (type == "界例")
                {
                    //显示界河例行的模版
                    SignConTempJHLX sct = new SignConTempJHLX(_sc, Id, 4);
                    sct.ShowDialog();
                    if (sct.DialogResult == DialogResult.OK)
                    {
                        sct.Close();
                        ifok = true;
                    }
                }

                if (type == "界专")
                {
                    SignConTemp sct = new SignConTemp(_sc, Id, 4);
                    sct.ShowDialog();

                    if (sct.DialogResult == DialogResult.OK)
                    {
                        sct.Close();
                        ifok = true;
                    }
                }

                if (ifok == true)
                {
                    //刷新数据
                    ///[BUG NO.2015-07-05 17:52]
                    BindUnsignData(true);

                    // 用户签字后,待办列表数目减少1,已办列表数目增加1
                    MainWindow mw = (MainWindow)this.MdiParent;
                    foreach (TreeNode t in mw.treeView1.Nodes)
                    {
                        if (t.Text.Contains("签字管理("))
                        {
                            int count = Convert.ToInt32(t.Text.Split('(')[1].Split(')')[0]);
                            if (count - 1 == 0)
                            {
                                t.Text          = "签字管理";
                                t.Nodes[0].Text = "待办列表";
                            }
                            else
                            {
                                t.Text          = "签字管理(" + (count - 1) + ")";
                                t.Nodes[0].Text = "待办列表(" + (count - 1) + ")";
                            }
                        }
                    }
                    //BindSignedData(true);
                }
                //SignConTemp sct = new SignConTemp(_sc, Id, 4);
                //sct.ShowDialog();
            }
        }
Пример #4
0
        // 已办列表的单击事件
        private async void DoneListView_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.RowIndex < 0)
            {
                return;
            }

            if (e.ColumnIndex == 1)
            {
                string id = this.DoneListView.Rows[e.RowIndex].Cells[0].Value.ToString();
                //这里也要区分模版类型
                string type = id[1].ToString() + id[2].ToString();
                if (type == "内例" || type == "内专")
                {
                    //显示内河的模版
                    SignConTempInside sct = new SignConTempInside(_sc, id, 5);
                    sct.ShowDialog();
                }

                if (type == "界例")
                {
                    //显示界河例行的模版
                    SignConTempJHLX sct = new SignConTempJHLX(_sc, id, 5);
                    sct.ShowDialog();
                }

                if (type == "界专")
                {
                    SignConTemp sct = new SignConTemp(_sc, id, 5);
                    sct.ShowDialog();
                }
            }

            //下载
            if (e.ColumnIndex == 8)
            {
                //获取会签单编号
                string Id = this.DoneListView.Rows[e.RowIndex].Cells[0].Value.ToString();
                if (HDJContract.GetIsOnlineFromContractId(Id) == false)
                {
                    MessageBox.Show(@"该会签单是离线审批的会签单, 无法通过本系统进行下载", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    return;
                }

                MessageBox.Show(@"温馨提示
如果您是首次下载附件,系统将为您生成会签单文件,这个过程比较费时间,希望您能耐心等待!
生成过程中我们会在磁盘上为您生成缓存文件,打开缓存可能会导致文件损毁!
为防止用户误操作造成的损毁,我们已经为您做了备份。
如果下载完成后提示您文件损坏无法打开,您只需要点击重新下载即可,系统会立即调用缓存为您重新生成(这个速度是很快的)
由此给您带来的不便,我们表示真诚的歉意", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);

                SaveFileDialog sfd = new SaveFileDialog();
                sfd.FileName = this.DoneListView.Rows[e.RowIndex].Cells[0].Value.ToString();
                sfd.Filter   = "*.pdf | *.*";
                if (sfd.ShowDialog() == DialogResult.OK)
                {
                    MainWindow mw = (MainWindow)this.MdiParent;
                    cmd.ShowOpaqueLayer(this.groupBox2, 125, true, true, "正在下载中,请稍候");
                    mw.treeView1.Enabled = false;

                    string filepath = sfd.FileName.ToString() + ".pdf";
                    //下载会签单
                    await _sc.DownloadHDJContract(Id, filepath);

                    //if(cmd.)
                    //{
                    cmd.HideOpaqueLayer();
                    //}
                    MessageBox.Show("下载完成!");

                    mw.treeView1.Enabled = true;
                }
            }
        }
Пример #5
0
        // 待签字列表的单机事件
        private void ToDoListView_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.RowIndex < 0)
            {
                return;
            }
            if (e.ColumnIndex == 1)
            {
                string Id = this.ToDoListView.Rows[e.RowIndex].Cells[0].Value.ToString();
                SignConTemp sct = new SignConTemp(_sc, Id, 4);
                sct.ShowDialog();

                if (sct.DialogResult == DialogResult.OK)
                {
                    sct.Close();
                    ///[BUG NO.2015-07-05 17:52]

                    BindUnsignData(true);

                    // 用户签字后,待办列表数目减少1,已办列表数目增加1
                    MainWindow mw = (MainWindow)this.MdiParent;
                    foreach (TreeNode t in mw.treeView1.Nodes)
                    {
                        if (t.Text.Contains("签字管理("))
                        {
                            int count = Convert.ToInt32(t.Text.Split('(')[1].Split(')')[0]);
                            if (count - 1 == 0)
                            {
                                t.Text = "签字管理";
                                t.Nodes[0].Text = "待办列表";
                            }
                            else
                            {
                                t.Text = "签字管理(" + (count - 1) + ")";
                                t.Nodes[0].Text = "待办列表(" + (count - 1) + ")";
                            }
                        }
                    }
                    //BindSignedData(true);
                }
            }
        }
Пример #6
0
        // 已办列表的单击事件
        private void DoneListView_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.RowIndex < 0)
            {
                return;
            }
            if (e.ColumnIndex == 1)
            {

                string id = this.DoneListView.Rows[e.RowIndex].Cells[0].Value.ToString();
                SignConTemp sct = new SignConTemp(_sc, id, 5);
                sct.ShowDialog();

            }
        }
Пример #7
0
        private async void SignAgree_CellContentClick(object sender, DataGridViewCellEventArgs e)        //已通过列表操作列表
        {
            if (e.RowIndex < 0)
            {
                return;
            }
            if (e.ColumnIndex == 1)
            {
                string Id = this.SignAgree.Rows[e.RowIndex].Cells[0].Value.ToString();
                SignConTemp sct = new SignConTemp(_sc, Id, 3);
                sct.ShowDialog();
            }
            if (e.ColumnIndex == 4)
            {
                MessageBox.Show(@"温馨提示
如果您是首次下载附件,系统将为您生成会签单文件,这个过程比较费时间,希望您能耐心等待!
生成过程中我们会在磁盘上为您生成缓存文件,打开缓存可能会导致文件损毁!
为防止用户误操作造成的损毁,我们已经为您做了备份。
如果下载完成后提示您文件损坏无法打开,您只需要点击重新下载即可,系统会立即调用缓存为您重新生成(这个速度是很快的)
由此给您带来的不便,我们表示真诚的歉意", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                
                string Id = this.SignAgree.Rows[e.RowIndex].Cells[0].Value.ToString();
                SaveFileDialog sfd = new SaveFileDialog();
                sfd.FileName = this.SignAgree.Rows[e.RowIndex].Cells[0].Value.ToString();
                sfd.Filter = "*.pdf | *.*";
                if (sfd.ShowDialog() == DialogResult.OK)
                {
                    MainWindow mw = (MainWindow)this.MdiParent;
                    cmd.ShowOpaqueLayer(this.groupBox2, 125, true,true,"正在下载中,请稍候");
                    mw.treeView1.Enabled = false;

                    string filepath = sfd.FileName.ToString()+".pdf";
                    await _sc.DownloadHDJContract(Id, filepath);
                    //if(cmd.)
                    //{
                        cmd.HideOpaqueLayer();
                    //}
                    MessageBox.Show("下载完成!");
                    mw.treeView1.Enabled = true;
                
                    foreach (TreeNode t in mw.treeView1.Nodes)
                    {
                        if (t.Text.Contains("提交管理("))
                        {
                            //t.Nodes[0]  -=>  提交方案
                            //t.Nodes[1]  -=>  审核中
                            //t.Nodes[2]  -=>  已拒绝
                            //t.Nodes[3]  -=>  已通过
                            int count = Convert.ToInt32(t.Text.Split('(')[1].Split(')')[0]);
                            if (count - 1 == 0)
                            {
                                t.Text = "提交管理";
                                t.Nodes[3].Text = "已通过";
                            }
                            else
                            {
                                t.Text = "提交管理(" + (count - 1) + ")";
                                int childcount = Convert.ToInt32(t.Nodes[3].Text.Split('(')[1].Split(')')[0]);
                                if (childcount - 1 == 0)
                                {
                                    t.Nodes[3].Text = "已通过";
                                }
                                else
                                {
                                    t.Nodes[3].Text = "已通过(" + (childcount - 1) + ")";
                                }
                            }
                        }
                    }
                }
            }
        }
Пример #8
0
        private void SignRefuse_CellContentClick(object sender, DataGridViewCellEventArgs e)              //已拒绝列表操作功能
        {
            if (e.RowIndex < 0)
            {
                return;
            }
            if (e.ColumnIndex == 1)
            {
                string Id = this.SignRefuse.Rows[e.RowIndex].Cells[0].Value.ToString();
                SignConTemp sct = new SignConTemp(_sc, Id, 2);
                sct.ShowDialog();
            }
            else if (e.ColumnIndex == 4)
            {
                string Id = this.SignRefuse.Rows[e.RowIndex].Cells[0].Value.ToString();
                ReSubmitConTemp rsct = new ReSubmitConTemp(_sc, Id);
                rsct.ShowDialog();
                if (rsct.DialogResult == DialogResult.OK)
                {
                    rsct.Close();
                    ////
                    BindRefuseList(true);      // 重新提交后,强制是刷新拒绝列表
                    BindPenddingList(true);

                    MainWindow mw = (MainWindow)this.MdiParent;
                    foreach (TreeNode t in mw.treeView1.Nodes)
                    {
                        if (t.Text.Contains("提交管理("))
                        {
                            //t.Nodes[0]  -=>  提交方案
                            //t.Nodes[1]  -=>  审核中
                            //t.Nodes[2]  -=>  已拒绝
                            //t.Nodes[3]  -=>  已通过
                            int count = Convert.ToInt32(t.Text.Split('(')[1].Split(')')[0]);
                            if (count - 1 == 0)
                            {
                                t.Text = "提交管理";
                                t.Nodes[2].Text = "已拒绝";
                            }
                            else
                            {
                                t.Text = "提交管理(" + (count - 1) + ")";
                                int childcount = Convert.ToInt32(t.Nodes[2].Text.Split('(')[1].Split(')')[0]);
                                if (childcount - 1 == 0)
                                {
                                    t.Nodes[2].Text = "已拒绝";
                                }
                                else
                                {
                                    t.Nodes[2].Text = "已拒绝(" + (childcount - 1) + ")";
                                }
                            }
                        }
                    }
                }
            }
        }
Пример #9
0
        private void SignPendding_CellContentClick(object sender, DataGridViewCellEventArgs e)           //查看正在审批方案的详细信息
        {
            if (e.RowIndex < 0)
            {
                return;
            }
            if (e.ColumnIndex == 1)
            {

                string Id = this.SignPendding.Rows[e.RowIndex].Cells[0].Value.ToString();
                SignConTemp sct = new SignConTemp(_sc, Id, 1);
                sct.ShowDialog();
            }
        }
Пример #10
0
        private async void SignAgree_CellContentClick(object sender, DataGridViewCellEventArgs e)        //已通过列表操作列表
        {
            if (e.RowIndex < 0)
            {
                return;
            }
            if (e.ColumnIndex == 1)
            {
                string Id = this.SignAgree.Rows[e.RowIndex].Cells[0].Value.ToString();
                SignConTemp sct = new SignConTemp(_sc, Id, 3);
                sct.ShowDialog();
            }
            else if (e.ColumnIndex == 4)
            {
                string Id = this.SignAgree.Rows[e.RowIndex].Cells[0].Value.ToString();
                if (HDJContract.GetIsOnlineFromContractId(Id) == false)
                {
                    //if(MessageBox.Show(, "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    if (MessageBox.Show(@"该会签单是离线审批的会签单, 请问您执意要下载么?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
                    {
                        return;
                    }
                }

                MessageBox.Show(@"温馨提示
如果您是首次下载附件,系统将为您生成会签单文件,这个过程比较费时间,希望您能耐心等待!
生成过程中我们会在磁盘上为您生成缓存文件,打开缓存可能会导致文件损毁!
为防止用户误操作造成的损毁,我们已经为您做了备份。
如果下载完成后提示您文件损坏无法打开,您只需要点击重新下载即可,系统会立即调用缓存为您重新生成(这个速度是很快的)
由此给您带来的不便,我们表示真诚的歉意", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);

                SaveFileDialog sfd = new SaveFileDialog();
                sfd.FileName = this.SignAgree.Rows[e.RowIndex].Cells[0].Value.ToString();
                sfd.Filter = "*.pdf | *.*";
                if (sfd.ShowDialog() == DialogResult.OK)
                {
                    MainWindow mw = (MainWindow)this.MdiParent;
                    cmd.ShowOpaqueLayer(this.groupBox2, 125, true, true, "正在下载中,请稍候");
                    mw.treeView1.Enabled = false;

                    string filepath = sfd.FileName.ToString() + ".pdf";
                    await _sc.DownloadHDJContract(Id, filepath);
                    //if(cmd.)
                    //{
                    cmd.HideOpaqueLayer();
                    //}
                    MessageBox.Show("下载完成!");
                    mw.treeView1.Enabled = true;

                    foreach (TreeNode t in mw.treeView1.Nodes)
                    {
                        if (t.Text.Contains("提交管理("))
                        {
                            //t.Nodes[0]  -=>  提交方案
                            //t.Nodes[1]  -=>  审核中
                            //t.Nodes[2]  -=>  已拒绝
                            //t.Nodes[3]  -=>  已通过
                            int count = Convert.ToInt32(t.Text.Split('(')[1].Split(')')[0]);
                            if (count - 1 == 0)
                            {
                                t.Text = "提交管理";
                                t.Nodes[3].Text = "已通过";
                            }
                            else
                            {
                                t.Text = "提交管理(" + (count - 1) + ")";

                                if(t.Nodes[3].Text.Contains("已通过("))
                                {
                                    int childcount = Convert.ToInt32(t.Nodes[3].Text.Split('(')[1].Split(')')[0]);
                                    if (childcount - 1 == 0)
                                    {
                                        t.Nodes[3].Text = "已通过";
                                    }
                                    else
                                    {
                                        t.Nodes[3].Text = "已通过(" + (childcount - 1) + ")";
                                    }
                                }
                            }
                        }
                    }
                }
            }
            else if (e.ColumnIndex == 5)
            {
                string Id = this.SignAgree.Rows[e.RowIndex].Cells[0].Value.ToString();
                if (UserHelper.UserInfo.IsAdmin != 1 && UserHelper.UserInfo.CanStatistic != 1)
                {
                    MessageBox.Show(@"您没有权限重新生成会签单", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    return;
                }
                if (HDJContract.GetIsOnlineFromContractId(Id) == false)
                {
                    //MessageBox.Show(@"该会签单是离线审批的会签单, 无法通过本系统进行生成", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    if (MessageBox.Show(@"该会签单是离线审批的会签单, 请问您执意要重新生成么?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
                    {
                        return;
                    }
                }

                MessageBox.Show(@"重新生成会签单以后请不要立即在系统中下载, 否则会导致系统崩溃, 因为服务器可能正在生成你的请求,生成的过程需要几分钟", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                this._sc.ReCreateHDJContract(Id);
            }
        }
Пример #11
0
        private void SignRefuse_CellContentClick(object sender, DataGridViewCellEventArgs e)              //已拒绝列表操作功能
        {
            if (e.RowIndex < 0)
            {
                return;
            }
            if (e.ColumnIndex == 1)
            {
                string Id = this.SignRefuse.Rows[e.RowIndex].Cells[0].Value.ToString();
                SignConTemp sct = new SignConTemp(_sc, Id, 2);
                sct.ShowDialog();
            }
            else if (e.ColumnIndex == 4)
            {
                string Id = this.SignRefuse.Rows[e.RowIndex].Cells[0].Value.ToString();
                ReSubmitConTemp rsct = new ReSubmitConTemp(_sc, Id);
                rsct.ShowDialog();
                if (rsct.DialogResult == DialogResult.OK)
                {
                    rsct.Close();
                    ////
                    BindRefuseList(true);      // 重新提交后,强制是刷新拒绝列表
                    BindPenddingList(true);

                    MainWindow mw = (MainWindow)this.MdiParent;
                    foreach (TreeNode t in mw.treeView1.Nodes)
                    {
                        if (t.Text.Contains("提交管理("))   //  提交管理列表的数据减1
                        {
                            //t.Nodes[0]  -=>  提交方案
                            //t.Nodes[1]  -=>  审核中
                            //t.Nodes[2]  -=>  已拒绝
                            //t.Nodes[3]  -=>  已通过
                            int count = Convert.ToInt32(t.Text.Split('(')[1].Split(')')[0]);
                            if (count - 1 == 0)
                            {
                                t.Text = "提交管理";
                                t.Nodes[2].Text = "已拒绝";
                            }
                            else
                            {
                                t.Text = "提交管理(" + (count - 1) + ")";

                                if (t.Nodes[2].Text.Contains("已拒绝("))
                                {
                                    int childcount = Convert.ToInt32(t.Nodes[2].Text.Split('(')[1].Split(')')[0]);
                                    if (childcount - 1 == 0)
                                    {
                                        t.Nodes[2].Text = "已拒绝";
                                    }
                                    else
                                    {
                                        t.Nodes[2].Text = "已拒绝(" + (childcount - 1) + ")";
                                    }
                                }
                            }
                        }
                    }
                }
            }

            else if (e.ColumnIndex == 5)
            {   // 2015-03-09 11:23  modify by gatieme for 删除已经拒绝的单子, 使编号可以被重用
                if (MessageBox.Show("确定要删除此单子?\n危险操作,请谨慎进行\n会签单是本系统中重要的数据,随意删除可能将引入很多不安全问题,请问您是否继续删除", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
                {
                    string Id = this.SignRefuse.Rows[e.RowIndex].Cells[0].Value.ToString();
                    string result = _sc.DeleteHDJContract(Id);

                    if (result == Response.DELETE_HDJCONTRACT_SUCCESS.ToString())
                    {
                        MessageBox.Show("删除会签单成功!", "提示", MessageBoxButtons.OK);

                        ////
                        BindRefuseList(true);      // 重新提交后,强制是刷新拒绝列表

                    }
                    else if (result == "服务器连接中断")
                    {
                        MessageBox.Show("服务器连接中断,删除失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    }
                    else
                    {
                        MessageBox.Show("删除会签单失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    }
                }

            }
        }