示例#1
0
        /// <summary>
        /// 窗口装入事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Frm_fireCheckin_Load(object sender, EventArgs e)
        {
            //获取传入 数据集
            checkin_ds = this.swapdata["dataset"] as Checkin_ds;
            action     = this.swapdata["action"].ToString();

            if (this.swapdata.ContainsKey("businessObject"))
            {
                businessObject = this.swapdata["businessObject"] as BaseBusiness;
            }

            lookUp_ac005.Properties.DataSource    = checkin_ds.St01_reason;
            lookUp_ac005.Properties.ValueMember   = "ST003";
            lookUp_ac005.Properties.DisplayMember = "ST003";
            checkin_ds.St01_reason.Sort           = "SORTID ASC";

            lookUp_ac052.Properties.DataSource    = checkin_ds.St01_relation;
            lookUp_ac052.Properties.ValueMember   = "ST003";
            lookUp_ac052.Properties.DisplayMember = "ST003";
            checkin_ds.St01_relation.Sort         = "SORTID ASC";

            lookUp_ac060.Properties.DataSource    = checkin_ds.St01_driver;
            lookUp_ac060.Properties.ValueMember   = "ST001";
            lookUp_ac060.Properties.DisplayMember = "ST003";
            checkin_ds.St01_driver.Sort           = "SORTID ASC";

            lookUp_ac007.Properties.DataSource    = checkin_ds.St01_district;
            lookUp_ac007.Properties.ValueMember   = "ST003";
            lookUp_ac007.Properties.DisplayMember = "ST003";
            checkin_ds.St01_district.Sort         = "SORTID ASC";

            lookup_gtype.Properties.DataSource    = checkin_ds.St01_gtype;
            lookup_gtype.Properties.ValueMember   = "ST001";
            lookup_gtype.Properties.DisplayMember = "ST003";
            checkin_ds.St01_gtype.Sort            = "SORTID ASC";

            if (string.Equals(action, "edit"))
            {
                this.Text = "登记修改";
                AC001     = this.swapdata["AC001"].ToString();

                ac01 = ac01_dao.GetSingle(s => s.ac001 == AC001);
                if (ac01 == null)
                {
                    b_ok.Enabled = false;
                    MessageBox.Show("查找数据失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    b_ok.Enabled = false;
                    return;
                }

                txtEdit_ac003.EditValue  = ac01.ac003;
                rg_ac002.EditValue       = ac01.ac002;
                txtEdit_ac004.EditValue  = ac01.ac004;
                txtedit_ac014.EditValue  = ac01.ac014;
                txtEdit_ac009.EditValue  = ac01.ac009;
                dateEdit_ac010.EditValue = ac01.ac010;
                lookUp_ac005.EditValue   = ac01.ac005;
                lookUp_ac060.EditValue   = ac01.ac060;
                lookUp_ac007.EditValue   = ac01.ac007;
                lookup_gtype.EditValue   = ac01.ac300;                  //逝者类型
                txtEdit_ac008.EditValue  = ac01.ac008;

                txtEdit_ac050.EditValue = ac01.ac050;
                txtEdit_ac051.EditValue = ac01.ac051;
                lookUp_ac052.EditValue  = ac01.ac052;

                txtEdit_ac150.EditValue = ac01.ac150;
                txtEdit_ac151.EditValue = ac01.ac151;
                lookUp_ac152.EditValue  = ac01.ac152;

                txtEdit_ac055.EditValue = ac01.ac055;
                mem_ac099.EditValue     = ac01.ac099;
                be_url.Enabled          = false;

                //读入照片
                if (MiscAction.HasIDC(AC001))
                {
                    OracleDataReader photo_reader = SqlAssist.ExecuteReader("select ic020 from ic01 where ic000 = '0' and ac001 ='" + AC001 + "'");
                    if (photo_reader.HasRows && photo_reader.Read())
                    {
                        MemoryStream ms        = new MemoryStream((byte[])photo_reader["IC020"]); //把照片读到MemoryStream里
                        Image        imageBlob = Image.FromStream(ms, true);                      //用流创建Image
                        pictureEdit1.Image = imageBlob;                                           //输出图片
                    }
                    photo_reader.Dispose();
                }
            }
            else
            {
                ac01 = new Ac01();
                if (checkin_ds.St01_gtype.Count > 0)
                {
                    lookup_gtype.EditValue = checkin_ds.St01_gtype.ToTable().Rows[0]["ST001"];
                }
            }
        }
示例#2
0
        /// <summary>
        /// 窗口装入事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Frm_fireCheckin_Load(object sender, EventArgs e)
        {
            //获取传入 数据集
            checkin_ds = this.swapdata["dataset"] as Checkin_ds;
            action     = this.swapdata["action"].ToString();

            if (this.swapdata.ContainsKey("businessObject"))
            {
                businessObject = this.swapdata["businessObject"] as BaseBusiness;
            }

            lookUp_ac005.Properties.DataSource    = checkin_ds.St01_reason;
            lookUp_ac005.Properties.ValueMember   = "ST003";
            lookUp_ac005.Properties.DisplayMember = "ST003";
            checkin_ds.St01_reason.Sort           = "SORTID ASC";

            lookUp_ac052.Properties.DataSource    = checkin_ds.St01_relation;
            lookUp_ac052.Properties.ValueMember   = "ST003";
            lookUp_ac052.Properties.DisplayMember = "ST003";
            checkin_ds.St01_relation.Sort         = "SORTID ASC";

            lookUp_ac060.Properties.DataSource    = checkin_ds.St01_driver;
            lookUp_ac060.Properties.ValueMember   = "ST001";
            lookUp_ac060.Properties.DisplayMember = "ST003";
            checkin_ds.St01_driver.Sort           = "SORTID ASC";

            lookUp_ac007.Properties.DataSource    = checkin_ds.St01_district;
            lookUp_ac007.Properties.ValueMember   = "ST001";
            lookUp_ac007.Properties.DisplayMember = "ST003";
            checkin_ds.St01_district.Sort         = "SORTID ASC";

            if (string.Equals(action, "edit"))
            {
                this.Text = "登记修改";
                AC001     = this.swapdata["AC001"].ToString();

                ac01 = ac01_dao.GetSingle(s => s.ac001 == AC001);
                if (ac01 == null)
                {
                    b_ok.Enabled = false;
                    MessageBox.Show("查找数据失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    b_ok.Enabled = false;
                    return;
                }

                txtEdit_ac003.EditValue  = ac01.ac003;
                rg_ac002.EditValue       = ac01.ac002;
                txtEdit_ac004.EditValue  = ac01.ac004;
                txtedit_ac014.EditValue  = ac01.ac014;
                txtEdit_ac009.EditValue  = ac01.ac009;
                dateEdit_ac010.EditValue = ac01.ac010;
                lookUp_ac005.EditValue   = ac01.ac005;
                lookUp_ac060.EditValue   = ac01.ac060;
                lookUp_ac007.EditValue   = ac01.ac007;
                txtEdit_ac008.EditValue  = ac01.ac008;

                txtEdit_ac050.EditValue = ac01.ac050;
                txtEdit_ac051.EditValue = ac01.ac051;
                lookUp_ac052.EditValue  = ac01.ac052;

                txtEdit_ac150.EditValue = ac01.ac150;
                txtEdit_ac151.EditValue = ac01.ac151;
                lookUp_ac152.EditValue  = ac01.ac152;

                txtEdit_ac055.EditValue = ac01.ac055;
                mem_ac099.EditValue     = ac01.ac099;
            }
            else
            {
                ac01 = new Ac01();
            }
        }
示例#3
0
        private void Frm_ac01_Load(object sender, EventArgs e)
        {
            ac01_ds = this.swapdata["dataset"] as Ac01_ds;
            action  = this.swapdata["action"].ToString();

            if (this.swapdata.ContainsKey("businessObject"))
            {
                businessObject = this.swapdata["businessObject"] as BaseBusiness;
            }

            lookUp_ac005.Properties.DataSource    = ac01_ds.St01_reason;
            lookUp_ac005.Properties.ValueMember   = "ST003";
            lookUp_ac005.Properties.DisplayMember = "ST003";
            ac01_ds.St01_reason.Sort = "SORTID ASC";

            lookUp_ac052.Properties.DataSource    = ac01_ds.St01_relation;
            lookUp_ac052.Properties.ValueMember   = "ST003";
            lookUp_ac052.Properties.DisplayMember = "ST003";
            ac01_ds.St01_relation.Sort            = "SORTID ASC";


            lookUp_ac060.Properties.DataSource    = ac01_ds.St01_driver;
            lookUp_ac060.Properties.ValueMember   = "ST001";
            lookUp_ac060.Properties.DisplayMember = "ST003";
            ac01_ds.St01_driver.Sort = "SORTID ASC";

            lookUp_ac007.Properties.DataSource    = ac01_ds.St01_district;
            lookUp_ac007.Properties.ValueMember   = "ST001";
            lookUp_ac007.Properties.DisplayMember = "ST003";
            ac01_ds.St01_district.Sort            = "SORTID ASC";

            lookup_ash.Properties.DataSource    = ac01_ds.ct01_ASH_HANDLE;
            lookup_ash.Properties.ValueMember   = "CT004";
            lookup_ash.Properties.DisplayMember = "CT003";

            lookup_ac070.Properties.DataSource    = ac01_ds.ct01_HHL_TYPE;
            lookup_ac070.Properties.ValueMember   = "CT004";
            lookup_ac070.Properties.DisplayMember = "CT003";


            if (string.Equals(action, "edit"))
            {
                this.Text = "进灵登记修改";
                AC001     = this.swapdata["AC001"].ToString();

                ac01 = ac01_dao.GetSingle(s => s.ac001 == AC001);
                if (ac01 == null)
                {
                    b_ok.Enabled = false;
                    MessageBox.Show("查找数据失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    return;
                }

                txtEdit_ac003.EditValue  = ac01.ac003;
                rg_ac002.EditValue       = ac01.ac002;
                txtEdit_ac004.EditValue  = ac01.ac004;
                txtedit_ac014.EditValue  = ac01.ac014;
                txtEdit_ac009.EditValue  = ac01.ac009;
                dateEdit_ac010.EditValue = ac01.ac010;
                lookUp_ac005.EditValue   = ac01.ac005;
                lookUp_ac060.EditValue   = ac01.ac060;
                lookUp_ac007.EditValue   = ac01.ac007;
                txtEdit_ac008.EditValue  = ac01.ac008;
                txtEdit_ac050.EditValue  = ac01.ac050;
                lookUp_ac052.EditValue   = ac01.ac052;
                dateEdit_ac020.EditValue = ac01.ac020;
                txtEdit_ac051.EditValue  = ac01.ac051;
                txtEdit_ac055.EditValue  = ac01.ac055;
                mem_ac099.EditValue      = ac01.ac099;
                dateEdit_ac020.Enabled   = false;

                lookup_ash.EditValue   = ac01.ac006;                 //骨灰处理方式
                lookup_ac070.EditValue = ac01.ac070;                 //火化炉
                lookup_ac070.ReadOnly  = true;                       //火化炉 编辑时不能再修改!!!

                if (ac01.ac080 != null)
                {
                    label_forder.Text = ac01.ac080.ToString();                       //火化序号
                }
            }
            else
            {
                ac01 = new Ac01();
                dateEdit_ac020.EditValue = System.DateTime.Now;
            }
        }