Ejemplo n.º 1
0
        /// <summary>
        /// 构造函数
        /// </summary>
        public FormOSM_Offers_Add(string uuid = "")
        {
            InitializeComponent();

            buyer = new Buyer();
            seller = new Seller();
            offer_sheet = new OfferSheet();
            //hw = new HW();

            dataGridView_HW.AutoGenerateColumns = false;

            string whereString = "where PID = 10";
            SJZDController.setZD_ComboBox(whereString, comboBox_OFFERSHEET_REGION);

            whereString = "where PID = 33";
            SJZDController.setZD_ComboBox(whereString, comboBox_OFFERSHEET_TYPE);

            string offsht_code = "U" + uuid + "OSC" + DateTime.Now.ToString("yyyyMMddHHmmss");
            textBox_OFFERSHEET_CODE.Text = offsht_code;

            fillSellerComboBox(comboBox_SELLER);
            fillBuyerComboBox(comboBox_BUYER);
            //queryByHW(dataGridView_HW);
        }
Ejemplo n.º 2
0
 public FormOSM_Buyer_Add()
 {
     InitializeComponent();
     buyer = new Buyer();
 }
Ejemplo n.º 3
0
 /// <summary>
 /// 输入窗口内容构造购买方对象
 /// </summary>
 /// <param name="buyer"></param>
 private void createBuyer(Buyer buyer)
 {
     buyer.setCOM_NAME(textBox_COM_NAME_BUYER.Text);
     buyer.setCOM_CODE(textBox_COM_CODE_BUYER.Text);
     buyer.setADDR(textBox_ADDR_BUYER.Text);
     buyer.setCONTACT(textBox_CONTACT_BUYER.Text);
     buyer.setPHONE(textBox_PHONE_BUYER.Text);
     buyer.setZIP_CODE(textBox_ZIPCODE_BUYER.Text);
     buyer.setEMAIL(textBox_EMAIL_BUYER.Text);
     buyer.setFAX(textBox_FAX_BUYER.Text);
     buyer.setCOMMENT(textBox_COMMENT_BUYER.Text);
 }
Ejemplo n.º 4
0
        /// <summary>
        /// 实现数据库插入购买方数据
        /// </summary>
        /// <param name="buyer"></param>
        /// <returns></returns>
        private bool addBuyer(Buyer buyer)
        {
            string sql = "insert into OSM_GMF(COM_NAME,COM_CODE,ADDR,CONTACT,PHONE,ZIP_CODE,FAX,EMAIL,COMMENT) ";
            sql += "values ('" + buyer.getCOM_NAME() + "','" + buyer.getCOM_CODE() + "','";
            sql += buyer.getADDR() + "','" + buyer.getCONTACT() + "','";
            sql += buyer.getPHONE() + "','" + buyer.getZIP_CODE() + "','";
            sql += buyer.getFAX() + "','" + buyer.getEMAIL() + "','" + buyer.getCOMMENT() + "')";

            AccessDB adb = new AccessDB();
            bool isExecuteSucc = adb.SQLExecute(sql);
            if (isExecuteSucc)
            {
                MessageBox.Show("添加成功!", "消息");
            }
            else
            {
                MessageBox.Show("添加失败!", "消息");
            }
            return isExecuteSucc;
        }