Beispiel #1
0
        /// <summary>
        /// 加载数据
        /// </summary>
        /// <param name="MaterialGuid"></param>
        private void FillData(string SupplierGuid)
        {
            SupplierManage suppliermanage = new SupplierManage();
            DataTable      dtl            = suppliermanage.GetSupplierData_CN(SupplierGuid);

            if (dtl.Rows.Count > 0)
            {
                txtGuid.Text        = dtl.Rows[0]["Guid"].ToString();
                txtName.Text        = dtl.Rows[0]["Name"].ToString();
                txtSimpName.Text    = dtl.Rows[0]["SimpName"].ToString();
                txtLinkMan.Text     = dtl.Rows[0]["LinkMan"].ToString();
                txtTelephone.Text   = dtl.Rows[0]["Telephone"].ToString();
                txtFax.Text         = dtl.Rows[0]["Fax"].ToString();
                txtAddress.Text     = dtl.Rows[0]["Address"].ToString();
                txtZip.Text         = dtl.Rows[0]["Zip"].ToString();
                txtRemark.Text      = dtl.Rows[0]["Remark"].ToString();
                txtProduceType.Text = dtl.Rows[0]["ProduceType"].ToString();

                if (dtl.Rows[0]["IsEnable"].ToString() == "1")
                {
                    chkIsEnable.Checked = true;
                }
                else
                {
                    chkIsEnable.Checked = false;
                }
            }

            this.ShowDialog();
        }
Beispiel #2
0
        /// <summary>
        /// 加载数据
        /// </summary>
        /// <param name="MaterialGuid"></param>
        private void FillData(string SupplierGuid)
        {
            SupplierManage suppliermanage = new SupplierManage();
            DataTable      dtl            = suppliermanage.GetSupplierData_CN(SupplierGuid);

            if (dtl.Rows.Count > 0)
            {
                txtGuid.Text      = dtl.Rows[0]["Guid"].ToString();
                txtName.Text      = dtl.Rows[0]["Name"].ToString();
                txtSimpName.Text  = dtl.Rows[0]["SimpName"].ToString();
                txtLinkMan.Text   = dtl.Rows[0]["LinkMan"].ToString();
                txtTelephone.Text = dtl.Rows[0]["Telephone"].ToString();
                txtFax.Text       = dtl.Rows[0]["Fax"].ToString();
                txtAddress.Text   = dtl.Rows[0]["Address"].ToString();
                txtZip.Text       = dtl.Rows[0]["Zip"].ToString();
                txtRemark.Text    = dtl.Rows[0]["Remark"].ToString();
            }

            this.ShowDialog();
        }
        //选择供应商
        private void btnSelect_Click(object sender, EventArgs e)
        {
            frmSelectOtherData frmSelectOtherData = new frmSelectOtherData();

            frmSelectOtherData.ShowSelectData(3);
            if (frmSelectOtherData.Tag != null)
            {
                if (frmSelectOtherData.Tag.ToString().Trim() == "ClearTextBox")
                {
                    txtSupplier.Text = ""; //名称
                    txtSupplier.Tag  = ""; //Guid

                    txtLinkman.Text   = "";
                    txtTelephone.Text = "";
                    txtFax.Text       = "";
                }
                else
                {
                    string[] arrValue = frmSelectOtherData.Tag.ToString().Split('|');

                    if (arrValue.Length > 0)
                    {
                        txtSupplier.Text = arrValue[1]; //名称
                        txtSupplier.Tag  = arrValue[0]; //Guid

                        //根据此供应商自动填充此供应商的联系人,联系电话及传真
                        SupplierManage SupplierManage = new SupplierManage();
                        DataTable      dtl            = SupplierManage.GetSupplierData_CN(txtSupplier.Tag.ToString());
                        if (dtl.Rows.Count > 0)
                        {
                            txtLinkman.Text   = dtl.Rows[0]["LinkMan"].ToString();
                            txtTelephone.Text = dtl.Rows[0]["Telephone"].ToString();
                            txtFax.Text       = dtl.Rows[0]["Fax"].ToString();
                        }
                    }
                }
            }
        }