Esempio n. 1
0
        void dataGridView2_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            if (this.dataGridView2.Columns[e.ColumnIndex].Name == this.Column22.Name)
            {
                return;
            }

            this.ClearCurrent();
            this.FStatus.FStatus = FormStatusEnum.Edit;
            Business.Models.DirectSalesModel dsom = this.dataGridView2.Rows[e.RowIndex].DataBoundItem as Business.Models.DirectSalesModel;

            var dsod = this.PharmacyDatabaseService.GetDirectSalesOrderDetailModelByDirectSalesModel(dsom.DirectSalesOrderId, out msg);

            dsod.ToList <Business.Models.DirectSalesOrderDetailModel>().ForEach(r => { this._ListDirectSalesDetail.Add(r); });
            this.label2.Text       = dsom.SupplyUnitName;
            this.label5.Text       = dsom.PurchaseUnitName;
            this.textBox4.Text     = dsom.Checker;
            this.richTextBox1.Text = dsom.Memo;
            this._SupplyUnit       = this.PharmacyDatabaseService.GetSupplyUnit(out msg, dsom.SupplyUnitId);
            this._PurchaseUnit     = this.PharmacyDatabaseService.GetPurchaseUnit(out msg, dsom.PurchaseUnitId);
            this.dsOrder           = this.PharmacyDatabaseService.GetDirectSalesOrder(dsom.DirectSalesOrderId, out msg);

            this._Id = dsom.DirectSalesOrderId;
            this.dataGridView1.Refresh();
        }
Esempio n. 2
0
 private void ClearCurrent()
 {
     this.dsOrder = null;
     this._Id     = Guid.NewGuid();
     this._ListDirectSalesDetail.Clear();
     this.FStatus.FStatus   = FormStatusEnum.New;
     this._PurchaseUnit     = null;
     this._SupplyUnit       = null;
     this.textBox1.Text     = this.textBox2.Text = this.textBox3.Text = string.Empty;
     this.textBox4.Text     = this.textBox5.Text = string.Empty;
     this.label5.Text       = this.label2.Text = "无";
     this.label6.Text       = "地址:";
     this.label7.Text       = "联系电话:";
     this.label10.Text      = "负责人:";
     this.label11.Text      = "企业法人:";
     this.richTextBox1.Text = string.Empty;
     this.GetDirectSalesOrderUnapproved();
     this.dataGridView1.Refresh();
 }
Esempio n. 3
0
        void textBox2_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode != Keys.Return)
            {
                return;
            }

            using (Form_PurchaseUnit frm = new Form_PurchaseUnit(this.textBox2.Text.Trim()))
            {
                if (frm.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                {
                    this.label5.Text   = frm._PU.Name;
                    this.label6.Text   = "地址:" + frm._PU.DetailedAddress;
                    this.label7.Text   = "联系电话:" + frm._PU.ContactTel;
                    this.label10.Text  = "负责人:" + frm._PU.Header;
                    this.label11.Text  = "企业法人:" + frm._PU.LegalPerson;
                    this._PurchaseUnit = frm._PU;
                }
            }
        }
Esempio n. 4
0
        /// <summary>
        /// Executes the scenario.
        /// </summary>
        public Microsoft.Store.PartnerCenter.Models.Orders.Order PlaceOrder(string customerId, string offerId, int quantity, Models.PurchaseUnit PurchaseUnit, string Title = "new offer purchase")
        {
            //var partnerOperations = this.Context.UserPartnerOperations;

            //bydefault billing frequency monthly set
            var order = new Order()
            {
                ReferenceCustomerId = customerId,
                BillingCycle        = PurchaseUnit == PurchaseUnit.Years ? Microsoft.Store.PartnerCenter.Models.Offers.BillingCycleType.Annual : PurchaseUnit == PurchaseUnit.Months ? Microsoft.Store.PartnerCenter.Models.Offers.BillingCycleType.Monthly : Microsoft.Store.PartnerCenter.Models.Offers.BillingCycleType.None,
                LineItems           = new List <OrderLineItem>()
                {
                    new OrderLineItem()
                    {
                        OfferId      = offerId,
                        FriendlyName = Title,
                        Quantity     = quantity,
                    }
                }
            };

            return(ApplicationDomain.PartnerCenterClient.Customers.ById(customerId).Orders.Create(order));
        }
Esempio n. 5
0
 void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     this._PU          = this.dataGridView1.Rows[e.RowIndex].DataBoundItem as Models.PurchaseUnit;
     this.DialogResult = System.Windows.Forms.DialogResult.OK;
     this.Close();
 }