示例#1
0
        protected override void select( )
        {
            base.select( );

            model = new MulaolaoLibrary.yanpinchangqiancehuaLibrary( );
            SelectAll.yanpinchangqiancehuaAll query = new SelectAll.yanpinchangqiancehuaAll( );
            query.StartPosition        = FormStartPosition.CenterScreen;
            query.PassDataBetweenForm += new SelectAll.yanpinchangqiancehuaAll.PassDataBetweenFormHandler(query_PassDataBetweenForm);
            query.ShowDialog( );

            if (!string.IsNullOrEmpty(model.CQ01))
            {
                autoQuery( );
            }
        }
示例#2
0
 void assignMent( )
 {
     model = _bll.GetDataModel(model.idx);
     if (model == null)
     {
         return;
     }
     comboBox1.Text = model.CQ99;
     comboBox2.Text = model.CQ100;
     comboBox3.Text = model.CQ101;
     textBox44.Text = model.CQ102.ToString( );
     textBox45.Text = model.CQ103.ToString( );
     comboBox4.Text = model.CQ104;
     textBox46.Text = model.CQ105.ToString( );
     if (model.CQ106 > DateTime.MinValue && model.CQ106 < DateTime.MaxValue)
     {
         dateTimePicker26.Value = model.CQ106;
     }
     if (model.CQ107 > DateTime.MinValue && model.CQ107 < DateTime.MaxValue)
     {
         dateTimePicker27.Value = model.CQ107;
     }
     comboBox5.Text = model.CQ114;
 }
示例#3
0
 /// <summary>
 /// 保存
 /// </summary>
 /// <returns></returns>
 public bool SaveOfAll(MulaolaoLibrary.yanpinchangqiancehuaLibrary model, string tableNum, string tableName, string logins, DateTime dtOne, string stateOf, string stateOfOdd)
 {
     return(dao.SaveOfAll(model, tableNum, tableName, logins, dtOne, stateOf, stateOfOdd));
 }
示例#4
0
        void queryContent( )
        {
            #region
            model = _bll.GetDataTableOfModel(model.CQ01);
            if (model == null)
            {
                return;
            }
            textBox1.Text = model.CQ02;
            textBox2.Text = model.CQ03;
            textBox3.Text = model.CQ04;
            textBox4.Text = model.CQ05;
            if (model.CQ06 > DateTime.MinValue && model.CQ06 < DateTime.MaxValue)
            {
                dateTimePicker1.Value = model.CQ06;
            }
            if (model.CQ07 > DateTime.MinValue && model.CQ07 < DateTime.MaxValue)
            {
                model.CQ07 = dateTimePicker2.Value;
            }
            checkBox1.Checked  = model.CQ08.Trim( ) == "T" ? true : false;
            checkBox2.Checked  = model.CQ09.Trim( ) == "T" ? true : false;
            checkBox3.Checked  = model.CQ10.Trim( ) == "T" ? true : false;
            checkBox4.Checked  = model.CQ11.Trim( ) == "T" ? true : false;
            textBox5.Text      = model.CQ12;
            textBox6.Text      = model.CQ13;
            textBox7.Text      = model.CQ14.ToString( );
            checkBox5.Checked  = model.CQ15.Trim( ) == "T" ? true : false;
            checkBox6.Checked  = model.CQ16.Trim( ) == "T" ? true : false;
            checkBox7.Checked  = model.CQ17.Trim( ) == "T" ? true : false;
            checkBox8.Checked  = model.CQ18.Trim( ) == "T" ? true : false;
            checkBox9.Checked  = model.CQ19.Trim( ) == "T" ? true : false;
            textBox8.Text      = model.CQ20;
            textBox9.Text      = model.CQ21;
            checkBox10.Checked = model.CQ22.Trim( ) == "T" ? true : false;
            checkBox11.Checked = model.CQ23.Trim( ) == "T" ? true : false;
            checkBox12.Checked = model.CQ24.Trim( ) == "T" ? true : false;
            checkBox13.Checked = model.CQ25.Trim( ) == "T" ? true : false;
            checkBox14.Checked = model.CQ26.Trim( ) == "T" ? true : false;
            checkBox15.Checked = model.CQ27.Trim( ) == "T" ? true : false;
            textBox10.Text     = model.CQ28;
            checkBox16.Checked = model.CQ29.Trim( ) == "T" ? true : false;
            checkBox17.Checked = model.CQ30.Trim( ) == "T" ? true : false;
            checkBox18.Checked = model.CQ31.Trim( ) == "T" ? true : false;
            checkBox19.Checked = model.CQ32.Trim( ) == "T" ? true : false;
            textBox11.Text     = model.CQ33;
            textBox33.Text     = model.CQ35;
            textBox34.Text     = model.CQ36;
            textBox35.Text     = model.CQ37;
            textBox36.Text     = model.CQ38;
            textBox37.Text     = model.CQ39;
            textBox38.Text     = model.CQ40;
            textBox39.Text     = model.CQ41;
            textBox40.Text     = model.CQ42;
            textBox41.Text     = model.CQ43;
            textBox42.Text     = model.CQ44;
            textBox43.Text     = model.CQ45;
            textBox22.Text     = model.CQ46.ToString( );
            textBox23.Text     = model.CQ47.ToString( );
            textBox24.Text     = model.CQ48.ToString( );
            textBox25.Text     = model.CQ49.ToString( );
            textBox26.Text     = model.CQ50.ToString( );
            textBox27.Text     = model.CQ51.ToString( );
            textBox28.Text     = model.CQ52.ToString( );
            textBox29.Text     = model.CQ53.ToString( );
            textBox30.Text     = model.CQ54.ToString( );
            textBox31.Text     = model.CQ55.ToString( );
            textBox32.Text     = model.CQ56.ToString( );
            if (model.CQ57 > DateTime.MinValue && model.CQ57 < DateTime.MaxValue)
            {
                dateTimePicker5.Value = model.CQ57;
            }
            if (model.CQ58 > DateTime.MinValue && model.CQ58 < DateTime.MaxValue)
            {
                dateTimePicker4.Value = model.CQ58;
            }
            if (model.CQ59 > DateTime.MinValue && model.CQ59 < DateTime.MaxValue)
            {
                dateTimePicker6.Value = model.CQ59;
            }
            if (model.CQ60 > DateTime.MinValue && model.CQ60 < DateTime.MaxValue)
            {
                dateTimePicker7.Value = model.CQ60;
            }
            if (model.CQ61 > DateTime.MinValue && model.CQ61 < DateTime.MaxValue)
            {
                dateTimePicker8.Value = model.CQ61;
            }
            if (model.CQ62 > DateTime.MinValue && model.CQ62 < DateTime.MaxValue)
            {
                dateTimePicker9.Value = model.CQ62;
            }
            if (model.CQ63 > DateTime.MinValue && model.CQ63 < DateTime.MaxValue)
            {
                dateTimePicker10.Value = model.CQ63;
            }
            if (model.CQ64 > DateTime.MinValue && model.CQ64 < DateTime.MaxValue)
            {
                dateTimePicker11.Value = model.CQ64;
            }
            if (model.CQ65 > DateTime.MinValue && model.CQ65 < DateTime.MaxValue)
            {
                dateTimePicker12.Value = model.CQ65;
            }
            if (model.CQ66 > DateTime.MinValue && model.CQ66 < DateTime.MaxValue)
            {
                dateTimePicker13.Value = model.CQ66;
            }
            if (model.CQ67 > DateTime.MinValue && model.CQ67 < DateTime.MaxValue)
            {
                dateTimePicker14.Value = model.CQ67;
            }
            if (model.CQ68 > DateTime.MinValue && model.CQ68 < DateTime.MaxValue)
            {
                dateTimePicker15.Value = model.CQ68;
            }
            if (model.CQ69 > DateTime.MinValue && model.CQ69 < DateTime.MaxValue)
            {
                dateTimePicker16.Value = model.CQ69;
            }
            if (model.CQ70 > DateTime.MinValue && model.CQ70 < DateTime.MaxValue)
            {
                dateTimePicker17.Value = model.CQ70;
            }
            if (model.CQ71 > DateTime.MinValue && model.CQ71 < DateTime.MaxValue)
            {
                dateTimePicker18.Value = model.CQ71;
            }
            if (model.CQ72 > DateTime.MinValue && model.CQ72 < DateTime.MaxValue)
            {
                dateTimePicker19.Value = model.CQ72;
            }
            if (model.CQ73 > DateTime.MinValue && model.CQ73 < DateTime.MaxValue)
            {
                dateTimePicker20.Value = model.CQ73;
            }
            if (model.CQ74 > DateTime.MinValue && model.CQ74 < DateTime.MaxValue)
            {
                dateTimePicker21.Value = model.CQ74;
            }
            if (model.CQ75 > DateTime.MinValue && model.CQ75 < DateTime.MaxValue)
            {
                dateTimePicker22.Value = model.CQ75;
            }
            if (model.CQ76 > DateTime.MinValue && model.CQ76 < DateTime.MaxValue)
            {
                dateTimePicker23.Value = model.CQ76;
            }
            if (model.CQ77 > DateTime.MinValue && model.CQ77 < DateTime.MaxValue)
            {
                dateTimePicker24.Value = model.CQ77;
            }
            if (model.CQ78 > DateTime.MinValue && model.CQ78 < DateTime.MaxValue)
            {
                dateTimePicker25.Value = model.CQ78;
            }
            checkBox20.Checked = model.CQ79.Trim( ) == "T" ? true : false;
            checkBox21.Checked = model.CQ80.Trim( ) == "T" ? true : false;
            checkBox22.Checked = model.CQ81.Trim( ) == "T" ? true : false;
            checkBox23.Checked = model.CQ82.Trim( ) == "T" ? true : false;
            checkBox24.Checked = model.CQ83.Trim( ) == "T" ? true : false;
            checkBox25.Checked = model.CQ84.Trim( ) == "T" ? true : false;
            checkBox26.Checked = model.CQ85.Trim( ) == "T" ? true : false;
            checkBox27.Checked = model.CQ86.Trim( ) == "T" ? true : false;
            textBox13.Text     = model.CQ87;
            textBox14.Text     = model.CQ88;
            textBox15.Text     = model.CQ89;
            textBox16.Text     = model.CQ90;
            textBox17.Text     = model.CQ91;
            textBox18.Text     = model.CQ92;
            textBox19.Text     = model.CQ93;
            textBox20.Text     = model.CQ94;
            textBox21.Text     = model.CQ95;
            if (model.CQ96 > DateTime.MinValue && model.CQ96 < DateTime.MaxValue)
            {
                dateTimePicker3.Value = model.CQ96;
            }
            textBox12.Text     = model.CQ108;
            checkBox28.Checked = model.CQ109.Trim( ) == "T" ? true : false;
            checkBox29.Checked = model.CQ110.Trim( ) == "T" ? true : false;
            checkBox30.Checked = model.CQ111.Trim( ) == "T" ? true : false;
            textBox47.Text     = model.CQ98;
            #endregion

            DataTable tableOfPic = _bll.GetDataTableOfPic(model.CQ01);
            if (tableOfPic != null && tableOfPic.Rows.Count > 0)
            {
                if ((( byte[] )tableOfPic.Rows[0]["CQ34"]).Length == 0)
                {
                    pictureBox1.Image = null;
                }
                else
                {
                    model.CQ34 = ( byte[] )tableOfPic.Rows[0]["CQ34"];
                    byte[]       mybyte = ( byte[] )tableOfPic.Rows[0]["CQ34"];
                    MemoryStream ms     = new MemoryStream(mybyte);
                    ms.Write(mybyte, 0, mybyte.Length);
                    ms.Position = 0;
                    ms.Seek(0, SeekOrigin.Begin);
                    Image img = Image.FromStream(ms, true);
                    pictureBox1.Image = img;
                }
            }

            strWhere = "1=1";
            strWhere = strWhere + " AND CQ01='" + model.CQ01 + "'";
            refre( );
        }