示例#1
0
        private void Btn_Submit_Click(object sender, EventArgs e)
        {
            Btn_Submit.Enabled = false;

            string Matter = string.Format("【故障报修】-审批意见:{0};费用明细:{1}", UserOpinion.Text.Trim(), ApproveDispose.GetFeeItem(this.FP_Fee));

            int count = sysidal.UpdateApprove_defalut("Meter_Maintain", ResolveID, IsPass.Checked, UserOpinion.Text.Trim(), PointSort, TaskID, Matter);

            if (count > 0)
            {
                if (IsCharge)
                {
                    MessageBox.Show("审批成功!");
                    ApproveDispose.UpdateFeeItem(this.FP_Fee, ResolveID);
                }
                else
                {
                    MessageBox.Show("审批成功!");
                }
            }
            else
            {
                Btn_Submit.Enabled = true;
            }
        }
        private void Btn_Submit_Click(object sender, EventArgs e)
        {
            Btn_Submit.Enabled = false;

            ip           = AppDomain.CurrentDomain.GetData("IP").ToString();
            ComputerName = AppDomain.CurrentDomain.GetData("COMPUTERNAME").ToString();
            string Matter = string.Format("【用户换表】-审批意见:{0};费用明细:{1}", UserOpinion.Text.Trim(), ApproveDispose.GetFeeItem(this.FP_Fee));

            int count = sysidal.UpdateApprove_defalut("Meter_Change", ResolveID, IsPass.Checked, UserOpinion.Text.Trim(), ip, ComputerName, PointSort, TaskID, Matter);

            if (count > 0)
            {
                if (IsCharge)
                {
                    MessageBox.Show("审批成功!");
                    ApproveDispose.UpdateFeeItem(this.FP_Fee, ResolveID);
                }
                else
                {
                    MessageBox.Show("审批成功!");
                }
            }
            else
            {
                Btn_Submit.Enabled = true;
            }
        }
        private void Btn_Submit_Click(object sender, EventArgs e)
        {
            Hashtable ht = new Hashtable();

            ht = new SqlServerHelper().GetHashTableByControl(this.panel2.Controls);
            new SqlServerHelper().Submit_AddOrEdit("Meter_Install_Single", "TaskID", TaskID, ht);

            Btn_Submit.Enabled = false;


            string Matter = string.Format("【技术说明】-水表数量:{0};水表型号:{1};水表位置:{2};技术说明:{3};费用明细:{4}", MeterCount.Text, waterMeterSizeMemo.Text, waterMeterPositionMemo.Text, UserOpinion.Text, ApproveDispose.GetFeeItem(this.FP_Fee));

            ComputerName = AppDomain.CurrentDomain.GetData("COMPUTERNAME").ToString();
            ip           = AppDomain.CurrentDomain.GetData("IP").ToString();

            int count = sysidal.UpdateApprove_Single_defalut(ResolveID, IsPass.Checked, UserOpinion.Text.Trim(), ip, ComputerName, PointSort, TaskID, Matter);

            if (count > 0)
            {
                if (IsCharge)
                {
                    MessageBox.Show("审批成功!");
                    ApproveDispose.UpdateFeeItem(this.FP_Fee, ResolveID);
                }
                else
                {
                    MessageBox.Show("审批成功!");
                }
            }
            else
            {
                Btn_Submit.Enabled = true;
            }
        }
示例#4
0
        private void InitView()
        {
            Hashtable hu = new SqlServerHelper().GetHashtableById("Meter_Install_Group", "TaskID", TaskID);

            if (hu.Contains("METERCOUNT"))
            {
                _GroupID = hu["GROUPID"].ToString();
                if (!string.IsNullOrEmpty(hu["METERCOUNT"].ToString()))
                {
                    _MeterCount     = int.Parse(hu["METERCOUNT"].ToString());
                    MeterCount.Text = hu["METERCOUNT"].ToString();
                    BindMeterSize();
                }
            }

            Hashtable ht = new SqlServerHelper().GetHashtableById("Meter_WorkResolve", "ResolveID", ResolveID);

            if (ht != null)
            {
                UserOpinion.Text = ht["USEROPINION"].ToString().Trim();

                if (ht["MAKESKIP"] != null && ht["MAKEPOINTID"] != null)//是否显示跳转
                {
                    skip = (bool)ht["MAKESKIP"];
                    if (skip)
                    {
                        IsSkip.Visible       = true;
                        LB_GoPointID.Visible = true;
                        CB_GoPointID.Visible = true;
                        string    sqlstr = string.Format("SELECT PointName,PointSort  FROM Meter_WorkPoint WHERE WorkFlowID='{0}' AND PointSort IN ({1}) ORDER BY PointSort", ht["WORKFLOWID"].ToString(), ht["GOPOINTID"].ToString());
                        DataTable dt     = new SqlServerHelper().GetDateTableBySql(sqlstr);
                        ControlBindHelper.BindComboBoxData(this.CB_GoPointID, dt, "PointName", "PointSort");
                    }
                }
                if (!string.IsNullOrEmpty(ht["ISVOIDED"].ToString()))//是否显示报废
                {
                    bool isvisable = false;
                    if (bool.TryParse(ht["ISVOIDED"].ToString(), out isvisable))
                    {
                        Btn_Voided.Visible = isvisable;
                    }
                }

                if (!string.IsNullOrEmpty(ht["ISCHARGE"].ToString()))
                {
                    if (bool.TryParse(ht["ISCHARGE"].ToString(), out IsCharge))
                    {
                        FP_Fee.Visible = IsCharge;
                        //添加收费项目
                        if (IsCharge)
                        {
                            FP_Fee.Controls.Clear();
                            ApproveDispose.BindFeeItemTextBox(this.FP_Fee, ResolveID);
                        }
                    }
                }
            }
        }
示例#5
0
        private void InitView()
        {
            Hashtable htt = new SqlServerHelper().GetHashtableById("Meter_WorkResolve", "ResolveID", ResolveID);

            if (htt != null)
            {
                if (!string.IsNullOrEmpty(htt["ISCASHIER"].ToString()))
                {
                    bool IsViewCharge = false;
                    if (bool.TryParse(htt["ISCASHIER"].ToString(), out IsViewCharge))
                    {
                        FP_Items.Visible = IsViewCharge;

                        if (IsViewCharge)
                        {
                            FP_Items.Controls.Clear();

                            ApproveDispose.BindLastFeeItems(this.FP_Items, TaskID, PointSort, out TotalFee, out _IsFinal, out _LastPointSort, out _State, out _FeeItems);
                            hc["LastPointSort"] = _LastPointSort;

                            INVOICEPRINTSIGN.Visible = _IsFinal;
                            ReceiptPrintSign.Enabled = _IsFinal;
                            _prestore     = sysidal.GetUserPrestore("Meter_Install_Single", TaskID);
                            prestore.Text = _prestore.ToString();//账户余额
                            if (_State == 1)
                            {
                                TotalFee      = 0m;
                                _Abate        = 0m;
                                _BCYS         = -_prestore;
                                LB_Title.Text = _IsFinal ? "待收费用列表(决算)--已收费:" : "待收费用列表(预收)--已收费:";
                            }
                            else
                            {
                                _Abate = sysidal.GetTotalAbate(TaskID, PointSort);
                                //本次应收:合计-减免-账户余额
                                _BCYS             = TotalFee - _Abate - _prestore;
                                LB_Title.Text     = _IsFinal ? "待收费用列表(决算)--未收费:" : "待收费用列表(预收)-未收费:";
                                hc["CHARGEClASS"] = 14;
                                if (_IsFinal)
                                {
                                    hc["CHARGEClASS"]  = 15;
                                    Btn_Settle.Visible = (TotalFee > 0 && _BCYS < 0) ? true : false;
                                }
                            }
                            TOTALCHARGE.Text = TotalFee.ToString(); //费用合计
                            CHARGEBCYS.Text  = _BCYS.ToString();    //本次应收
                            Abate.Text       = _Abate.ToString();   //减免
                            Btn_Submit.Text  = "确  定";

                            BindChargeType();
                            BindInvoiceBatch();
                        }
                    }
                }
            }
        }
示例#6
0
        private void Btn_Submit_Click(object sender, EventArgs e)
        {
            Btn_Submit.Enabled = false;
            int count = sysidal.UpdateApprove_defalut("Meter_Install_Group", ResolveID, IsPass.Checked, UserOpinion.Text.Trim(), PointSort, TaskID, "");

            if (count > 0)
            {
                if (IsCharge)
                {
                    ApproveDispose.UpdateFeeItem(this.FP_Fee, ResolveID);
                    SaveGroupMeter();
                    MessageBox.Show("审批成功!");
                }
                else
                {
                    MessageBox.Show("审批成功!");
                }
            }
            else
            {
                Btn_Submit.Enabled = true;
            }
        }
示例#7
0
        private void InitView()
        {
            Hashtable ht = new SqlServerHelper().GetHashtableById("Meter_WorkResolve", "ResolveID", ResolveID);

            if (ht != null)
            {
                UserOpinion.Text = ht["USEROPINION"].ToString().Trim();

                if (ht["MAKESKIP"] != null && ht["MAKEPOINTID"] != null)//是否显示跳转
                {
                    skip = (bool)ht["MAKESKIP"];
                    if (skip)
                    {
                        IsSkip.Visible       = true;
                        LB_GoPointID.Visible = true;
                        CB_GoPointID.Visible = true;
                        string    sqlstr = string.Format("SELECT PointName,PointSort  FROM Meter_WorkPoint WHERE WorkFlowID='{0}' AND PointSort IN ({1}) ORDER BY PointSort", ht["WORKFLOWID"].ToString(), ht["GOPOINTID"].ToString());
                        DataTable dt     = new SqlServerHelper().GetDateTableBySql(sqlstr);
                        ControlBindHelper.BindComboBoxData(this.CB_GoPointID, dt, "PointName", "PointSort");
                    }
                }
                if (!string.IsNullOrEmpty(ht["ISVOIDED"].ToString()))//是否显示报废
                {
                    bool isvisable = false;
                    if (bool.TryParse(ht["ISVOIDED"].ToString(), out isvisable))
                    {
                        Btn_Voided.Visible = isvisable;
                    }
                }

                if (!string.IsNullOrEmpty(ht["ISCHARGE"].ToString()))
                {
                    if (bool.TryParse(ht["ISCHARGE"].ToString(), out IsCharge))
                    {
                        FP_Fee.Visible = IsCharge;
                        //添加收费项目
                        if (IsCharge)
                        {
                            FP_Fee.Controls.Clear();
                            ApproveDispose.BindFeeItemTextBox(this.FP_Fee, ResolveID);

                            if (sysidal.IsHaveLastFeeItems(TaskID, PointSort))
                            {
                                //默认值传递
                                //=======================
                                Btn_More.Visible = true;
                                Btn_More.Left    = FP_Fee.Left;
                                Btn_More.Top     = FP_Fee.Top + FP_Fee.Height + 10;
                                DepartementID    = ht["DEPARTEMENTID"].ToString();
                                Btn_More.Click  += new EventHandler(Btn_More_Click);
                            }
                        }
                    }
                }
                if (!string.IsNullOrEmpty(ht["ISVIEWCHARGE"].ToString()))
                {
                    bool IsViewCharge = false;
                    if (bool.TryParse(ht["ISVIEWCHARGE"].ToString(), out IsViewCharge))
                    {
                        if (!FP_Fee.Visible)
                        {
                            FP_Items.Left    = FP_Fee.Left;
                            FP_Items.Top     = FP_Fee.Top;
                            FP_Items.Height += FP_Fee.Height;
                        }
                        FP_Items.Visible = IsViewCharge;

                        if (IsViewCharge)
                        {
                            FP_Items.Controls.Clear();
                            //查看所有收费项目
                            ApproveDispose.BindFeeItemLabel(this.FP_Items, TaskID, PointSort);
                        }
                    }
                }
                else
                {
                    if (FP_Fee.Visible)
                    {
                        FP_Fee.Height += FP_Items.Height;
                    }
                }
            }
        }