Exemple #1
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);
                        }
                    }
                }
            }
        }
Exemple #2
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;
                    }
                }
            }
        }