Ejemplo n.º 1
0
        private void Binddata()
        {
            DataTable dt = new SqlServerHelper().GetDataTable("waterUserType", "", "waterUserTypeId");

            ControlBindHelper.BindComboBoxData(this.waterUserTypeId, dt, "waterUserTypeName", "waterUserTypeId");

            DataTable dt2 = new SqlServerHelper().GetDataTable("waterUserHouseType", "", "waterUserHouseTypeID");

            ControlBindHelper.BindComboBoxData(this.waterUserHouseType, dt2, "waterUserHouseType", "waterUserHouseTypeID");

            if (string.IsNullOrEmpty(key))
            {
                userName.Text    = strRealName;
                toolEdit.Enabled = false;
            }
            else
            {
                Hashtable ht = new SqlServerHelper().GetHashtableById("Meter_Install_Single", "SingleID", key);
                new SqlServerHelper().BindHashTableToForm(ht, this.groupBox6.Controls);

                Btn_Submit.Enabled   = FlowFunction.IsAllowEdit(taskid);
                waterUserNO.Enabled  = false;
                waterUserNO.ReadOnly = true;
                toolEdit.Enabled     = true;
            }
        }
Ejemplo n.º 2
0
        private void FrmTransition_Load(object sender, EventArgs e)
        {
            strLogID    = AppDomain.CurrentDomain.GetData("LOGINID").ToString();
            strName     = AppDomain.CurrentDomain.GetData("LOGINNAME").ToString();
            strRealName = AppDomain.CurrentDomain.GetData("USERNAME").ToString();

            if (string.IsNullOrEmpty(key))
            {
                userName.Text = strRealName;
            }
            else
            {
                Hashtable ht = new SqlServerHelper().GetHashtableById("Meter_Install_Transition", "TransitionID", key);
                new SqlServerHelper().BindHashTableToForm(ht, this.panel1.Controls);

                Btn_Submit.Enabled = FlowFunction.IsAllowEdit(taskid);
            }
        }
Ejemplo n.º 3
0
        private void Binddata()
        {
            if (string.IsNullOrEmpty(key))
            {
                userName.Text = strRealName;
            }
            else
            {
                Hashtable ht = new SqlServerHelper().GetHashtableById("Meter_Install_Group", "GroupID", key);
                new SqlServerHelper().BindHashTableToForm(ht, this.groupBox6.Controls);

                DataTable dt = sysidal.GetMeter_Group_People(key);
                if (DataTableHelper.IsExistRows(dt))
                {
                    foreach (DataRow dr in dt.Rows)
                    {
                        GroupPeople_Model GM = new GroupPeople_Model();
                        GM.GroupPeopleID        = (Guid)dr["GroupPeopleID"];
                        GM.waterMeterTypeId     = dr["waterMeterTypeId"].ToString();
                        GM.waterMeterType       = dr["waterMeterTypeValue"].ToString();
                        GM.waterUserTypeId      = dr["waterUserTypeId"].ToString();
                        GM.waterUserType        = dr["waterUserTypeName"].ToString();
                        GM.waterUserHouseTypeID = (int)dr["waterUserHouseTypeID"];
                        GM.waterUserHouseType   = dr["waterUserHouseType"].ToString();
                        GM.UserCount_Apply      = (int)dr["UserCount_Apply"];
                        GM.IsBoot = (bool)dr["IsBoot"];

                        GPList.Add(GM);
                    }

                    GP.GroupPeople_Items = GPList;
                    BindGroupUser();
                }

                Btn_Submit.Enabled = FlowFunction.IsAllowEdit(taskid);
                Btn_Submit.Visible = Btn_Submit.Enabled;
            }
        }