123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176 |
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Windows.Forms;
- using LYFZ.Command;
- using LYFZ.ComponentLibrary;
- using System.Collections;
- using LYFZ.Software.MainBusiness.DoorCityProcess;
- namespace LYFZ.Software.MainBusiness.InitialSet
- {
- public partial class FrmPackagesGoodsSet : LYFZ.Software.UI.InitialSet.FrmPackagesGoodsSet
- {
- public FrmPackagesGoodsSet()
- {
- this.btnDown.Click += btnDown_Click;
- this.btnUp.Click += btnUp_Click;
- this.FormClosing += FrmPackagesGoodsSet_FormClosing;
- }
- LYFZ.BLL.BLL_ErpOrder orbll = new BLL.BLL_ErpOrder();
- LYFZ.BLL.BLL_ErpProduct ptbll = new BLL.BLL_ErpProduct();
- LYFZ.BLL.BLL_ErpPackages packages = new BLL.BLL_ErpPackages();
- LYFZ.BLL.BLL_ErpTheScenery tsbll = new BLL.BLL_ErpTheScenery();
- LYFZ.BLL.BLL_ErpSystemCategory scbll = new BLL.BLL_ErpSystemCategory();
- LYFZ.BLL.BLL_ErpPackagesGiftMerchandise pkgmbll = new BLL.BLL_ErpPackagesGiftMerchandise();
- #region 属性
- /// <summary>
- /// 是否保存
- /// </summary>
- public bool IsSaveed = false;
- /// <summary>
- /// 套系编号
- /// </summary>
- string StrPakPackagesID = "";
- private string _strPakUnitPrice;
- /// <summary>
- /// 套系价格
- /// </summary>
- public string StrPakUnitPrice
- {
- get
- {
- //string[] strValue = _strPakUnitPrice.Split(':');
- if (string.IsNullOrEmpty(_strPakUnitPrice))
- { return "0"; }
- else
- { return _strPakUnitPrice; }
- }
- set
- {
- _strPakUnitPrice = value;
- if (_strPakUnitPrice == "")
- { _strPakUnitPrice = "0"; }
- this.lblPakUnitPrice.Text = "套系价格:" + _strPakUnitPrice;
- }
- }
- private string _strPakIntoTheArchive;
- /// <summary>
- /// 赠送张数
- /// </summary>
- public string StrPakIntoTheArchive
- {
- get { return _strPakIntoTheArchive; }
- set
- {
- _strPakIntoTheArchive = value;
- this.lblPakIntoTheArchive.Text = "赠送张数:" + _strPakIntoTheArchive;
- }
- }
- /// <summary>
- /// true为首次运行
- /// </summary>
- private bool IsFirstLoad = true;
- /// <summary>
- /// 套系设置是否有修改
- /// </summary>
- private bool IsPackagesSet = false;
- #endregion
- /// <summary>
- /// 窗体加载
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- protected override void FrmPackagesGoodsSet_Shown(object sender, EventArgs e)
- {
- WaitForm wf = new WaitForm();
- wf.ShowForm(this);
- try
- {
- //获取绑定拍摄次数 获取绑定套系名称
- LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.BindComboBoxTreeView_PackagesCategoryAndName(this.CtvPak_Name, StrParentCode: "AAAAAAB");
- this.tabPage1.Parent = null;
- this.tabPage2.Parent = null;
- switch (LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.GetBusinessType())
- {
- case LYFZ.Software.MainBusiness.EnumPermissions.BusinessType.儿童版:
- if (!LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.IsEnablePhotoEdition)
- {
- this.tabPage2.Parent = this.tab;
- this.btnUp.Visible = true;
- this.btnDown.Visible = true;
- }
- else
- {
- this.tabPage1.Parent = this.tab;
- this.tabPage2.Parent = this.tab;
- }
- break;
- case LYFZ.Software.MainBusiness.EnumPermissions.BusinessType.婚纱版:
- this.tabPage1.Parent = this.tab;
- break;
- default:
- this.tabPage1.Parent = this.tab;
- this.tabPage2.Parent = this.tab;
- break;
- }
- //清空
- this.StrPakPackagesID = "";
- this.StrPakUnitPrice = "0";
- this.StrPakIntoTheArchive = "0/0";
- this.dgv1.Rows.Clear();
- this.dgv2.Rows.Clear();
- this.dgv3.Rows.Clear();
- this.dgv4.Rows.Clear();
- #region 权限设置
- this.btnSave1.Enabled = false;
- this.btnProductSet.Enabled = false;
- this.btnDelete1.Enabled = false;
- this.btnDelete2.Enabled = false;
- this.btnDelete3.Enabled = false;
- if (LYFZ.BLL.BLL_ErpUser.GetRights(LYFZ.BLL.BLL_ErpUser.CurrentUserRights.PackagesGoodsCompetence, CustomAttributes.OperatingAuthority.Add) || LYFZ.BLL.BLL_ErpUser.GetRights(LYFZ.BLL.BLL_ErpUser.CurrentUserRights.PackagesGoodsCompetence, CustomAttributes.OperatingAuthority.Update))
- { this.btnSave1.Enabled = true; this.btnProductSet.Enabled = true; }
- if (LYFZ.BLL.BLL_ErpUser.GetRights(LYFZ.BLL.BLL_ErpUser.CurrentUserRights.PackagesGoodsCompetence, CustomAttributes.OperatingAuthority.Delete))
- {
- this.btnDelete1.Enabled = true;
- this.btnDelete2.Enabled = true;
- this.btnDelete3.Enabled = true;
- }
- #endregion
- wf.CloseForm();
- wf = null;
- }
- catch
- { wf.CloseForm(); wf = null; }
- this.IsFirstLoad = false;
- }
- /// <summary>
- /// 选择套系名称获取商品详细信息
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- protected override void CtvPak_Name_ComboBoxTree_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e)
- {
- WaitForm wf = new WaitForm();
- wf.ShowForm(this);
- try
- {
- if (CtvPak_Name.Tag != null)
- {
- this.Bind();
- this.GetCostSellingPrice();
- }
- wf.CloseForm();
- wf = null;
- }
- catch
- {
- wf.CloseForm();
- wf = null;
- }
- }
- /// <summary>
- /// 获取初始数据
- /// </summary>
- public void Bind()
- {
- this.dgv1.Rows.Clear();
- this.dgv2.Rows.Clear();
- this.dgv3.Rows.Clear();
- this.dgv4.Rows.Clear();
- //获取套系名称资料
- DataTable dt = packages.GetList("Pak_Name='" + this.CtvPak_Name.Text.ToString() + "'").Tables[0];
- if (dt.Rows.Count > 0)
- {
- this.StrPakPackagesID = dt.Rows[0]["Pak_PackagesID"].ToString();
- this.StrPakUnitPrice = dt.Rows[0]["Pak_UnitPrice"].ToString();
- this.StrPakIntoTheArchive = dt.Rows[0]["Pak_IntoTheArchive"].ToString() + "/" + dt.Rows[0]["Pak_IntoTheBook"].ToString();
- #region 获取套系赠送商品
- dt = pkgmbll.View_tb_ErpPackagesGiftMerchandise("Pgm_PackagesCode='" + this.StrPakPackagesID + "' and tb_ErpPackagesGiftMerchandise.Pgm_GiveType='0'").Tables[0];
- if (dt.Rows.Count > 0)
- {
- for (int t = 0; t < dt.Rows.Count; t++)
- {
- DataGridViewRow dgvr = new DataGridViewRow();
- DataGridViewCell cell = null;
- cell = new DataGridViewTextBoxCell();
- cell.Value = dt.Rows[t]["ID"].ToString().Trim();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dt.Rows[t]["Pgm_ProductNumber"].ToString().Trim();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dt.Rows[t]["Prod_Name"].ToString().Trim();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dt.Rows[t]["Pgm_Quantity"].ToString().Trim();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dt.Rows[t]["Prod_CostPrice"].ToString().Trim();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dt.Rows[t]["Prod_SalesPrice"].ToString().Trim();
- dgvr.Cells.Add(cell);
- this.dgv1.Rows.Add(dgvr);
- }
- }
- #endregion
- #region 获取服务内容
- dt = pkgmbll.View_tb_ErpPackagesGiftMerchandise("Pgm_PackagesCode='" + this.StrPakPackagesID + "' and tb_ErpPackagesGiftMerchandise.Pgm_GiveType='1'").Tables[0];
- if (dt.Rows.Count > 0)
- {
- for (int t = 0; t < dt.Rows.Count; t++)
- {
- DataGridViewRow dgvr = new DataGridViewRow();
- DataGridViewCell cell = null;
- cell = new DataGridViewTextBoxCell();
- cell.Value = dt.Rows[t]["ID"].ToString().Trim();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dt.Rows[t]["Pgm_ProductNumber"].ToString().Trim();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dt.Rows[t]["Prod_Name"].ToString().Trim();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dt.Rows[t]["Pgm_Quantity"].ToString().Trim();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dt.Rows[t]["Prod_CostPrice"].ToString().Trim();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dt.Rows[t]["Prod_SalesPrice"].ToString().Trim();
- dgvr.Cells.Add(cell);
- this.dgv2.Rows.Add(dgvr);
- }
- }
- #endregion
- #region 获取婚纱景点设置
- dt = pkgmbll.View_tb_ErpPackagesGiftMerchandise_tb_ErpTheScenery("Pgm_PackagesCode='" + this.StrPakPackagesID + "' and tb_ErpPackagesGiftMerchandise.Pgm_GiveType='2' and (tb_ErpPackagesGiftMerchandise.Pgm_GiveType!='1' or tb_ErpPackagesGiftMerchandise.Pgm_GiveType!='2' )").Tables[0];
- if (dt.Rows.Count > 0)
- {
- for (int t = 0; t < dt.Rows.Count; t++)
- {
- DataGridViewRow dgvr = new DataGridViewRow();
- DataGridViewCell cell = null;
- cell = new DataGridViewTextBoxCell();
- cell.Value = dt.Rows[t]["ID"].ToString().Trim();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dt.Rows[t]["Pgm_ProductNumber"].ToString().Trim();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dt.Rows[t]["Tsc_Name"].ToString().Trim();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dt.Rows[t]["Pgm_Quantity"].ToString().Trim();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dt.Rows[t]["Tsc_CostPrice"].ToString().Trim();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dt.Rows[t]["Tsc_SalesPrice"].ToString().Trim();
- dgvr.Cells.Add(cell);
- this.dgv3.Rows.Add(dgvr);
- }
- }
- #endregion
- #region 获取儿童景点设置
- dt = pkgmbll.GetList(" Pgm_PackagesCode='" + this.StrPakPackagesID + "' and Pgm_GiveType='3' and (Pgm_GiveType!='1' or Pgm_GiveType!='2' )", " id asc").Tables[0];
- if (dt.Rows.Count > 0)
- {
- for (int t = 0; t < dt.Rows.Count; t++)
- {
- DataGridViewRow dgvr = new DataGridViewRow();
- DataGridViewCell cell = null;
- cell = new DataGridViewTextBoxCell();
- cell.Value = dt.Rows[t]["ID"].ToString().Trim();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dt.Rows[t]["Pgm_ProductNumber"].ToString().Trim();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dt.Rows[t]["Pgm_ProductName"].ToString().Trim();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dt.Rows[t]["Pgm_Quantity"].ToString().Trim();
- dgvr.Cells.Add(cell);
- this.dgv4.Rows.Add(dgvr);
- }
- }
- #endregion
- }
- else
- {
- this.StrPakPackagesID = "";
- this.StrPakUnitPrice = "0";
- this.StrPakIntoTheArchive = "0/0";
- if (string.IsNullOrEmpty(this.StrPakPackagesID))
- {
- MessageBoxCustom.Show(this.CtvPak_Name.Text.ToString() + " 此类型无套系名称!请添加套系名称");
- this.CtvPak_Name.Text = "";
- }
- }
- }
- /// <summary>
- /// 套系赠送商品==删除
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- protected override void btnDelete1_Click(object sender, EventArgs e)
- {
- try
- {
- if (this.dgv1.Rows.Count > 0 && this.dgv1.SelectedRows.Count > 0)
- {
- if (MessageBoxCustom.Show("你确定要删除吗?", "删除提示", MessageBoxButtons.YesNo) == DialogResult.Yes)
- {
- //删除
- int Id = Convert.ToInt32(this.dgv1.CurrentRow.Cells["ID"].Value.ToString());
- if (Id == 0)
- { this.dgv1.Rows.RemoveAt(this.dgv1.CurrentRow.Index); }
- if (Id > 0)
- {
- if (pkgmbll.Delete(Id) == true) { }
- this.dgv1.Rows.RemoveAt(this.dgv1.CurrentRow.Index);
- }
- this.GetCostSellingPrice();
- }
- }
- }
- catch (Exception ex)
- { MessageBoxCustom.Show(ex.Message); }
- }
- /// <summary>
- /// 套系赠送商品==商品工具箱
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- protected override void btnToolbox1_Click(object sender, EventArgs e)
- {
- if (string.IsNullOrEmpty(this.CtvPak_Name.Text))
- { MessageBoxCustom.Show("请选择套系名称!"); return; }
- LYFZ.Software.MainBusiness.DoorCityProcess.SetSmallForm.ToolboxSamllForm frm = new DoorCityProcess.SetSmallForm.ToolboxSamllForm();
- frm.LoadType = "套系包含商品";
- frm.ShowDialog();
- if (frm.IsSaveed)
- {
- for (int i = 0; i < frm.mlist.Count; i++)
- {
- bool IsFind = false;
- for (int t = 0; t < this.dgv1.Rows.Count; t++)
- {
- if (this.dgv1.Rows[t].Cells["Pgm_ProductNumber"].Value.Equals(frm.mlist[i].Prod_Number))
- {
- this.dgv1.Rows[t].Cells["Pgm_Quantity"].Value = (Convert.ToInt32(this.dgv1.Rows[t].Cells["Pgm_Quantity"].Value) + 1).ToString();
- IsFind = true; break;
- }
- }
- if (!IsFind)
- {
- DataGridViewRow dgvr = new DataGridViewRow();
- DataGridViewCell cell = null;
- cell = new DataGridViewTextBoxCell();
- cell.Value = 0;
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = frm.mlist[i].Prod_Number;
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = frm.mlist[i].Prod_Name;
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = "1";
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = frm.mlist[i].Prod_CostPrice;
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = frm.mlist[i].Prod_SalesPrice;
- dgvr.Cells.Add(cell);
- this.dgv1.Rows.Add(dgvr);
- }
- }
- }
- this.GetCostSellingPrice();
- }
- /// <summary>
- /// 更改数量事件
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- protected override void dgv1_CellValueChanged(object sender, DataGridViewCellEventArgs e)
- {
- if (this.dgv1.Rows.Count > 0)
- {
- if (!Command.Command_Validate.IsNumber(this.dgv1.CurrentRow.Cells["Pgm_Quantity"].Value.ToString()))
- {
- MessageBoxCustom.Show("只能输入纯数字!");
- this.dgv1.CurrentRow.Cells["Pgm_Quantity"].Value = "1";
- return;
- }
- this.GetCostSellingPrice();
- }
- }
- /// <summary>
- /// 婚庆服务==删除
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- protected override void btnDelete2_Click(object sender, EventArgs e)
- {
- try
- {
- if (this.dgv2.Rows.Count > 0 && this.dgv2.SelectedRows.Count > 0)
- {
- if (MessageBoxCustom.Show("你确定要删除吗?", "删除提示", MessageBoxButtons.YesNo) == DialogResult.Yes)
- {
- //删除
- int Id = Convert.ToInt32(this.dgv2.CurrentRow.Cells["ID2"].Value.ToString());
- if (Id == 0)
- { this.dgv2.Rows.RemoveAt(this.dgv2.CurrentRow.Index); }
- else if (Id > 0)
- {
- if (pkgmbll.Delete(Id) == true)
- { this.dgv2.Rows.RemoveAt(this.dgv2.CurrentRow.Index); }
- }
- this.GetCostSellingPrice();
- }
- }
- }
- catch (Exception ex)
- { MessageBoxCustom.Show(ex.Message); }
- }
- /// <summary>
- /// 婚庆服务==商品工具箱
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- protected override void btnToolbox2_Click(object sender, EventArgs e)
- {
- if (string.IsNullOrEmpty(this.CtvPak_Name.Text))
- { MessageBoxCustom.Show("请选择套系名称!"); return; }
- LYFZ.Software.MainBusiness.DoorCityProcess.SetSmallForm.ToolboxSamllForm frm = new DoorCityProcess.SetSmallForm.ToolboxSamllForm();
- frm.LoadType = "婚庆报务";
- frm.ShowDialog();
- if (frm.IsSaveed)
- {
- for (int i = 0; i < frm.mlist.Count; i++)
- {
- bool IsFind = false;
- for (int t = 0; t < this.dgv2.Rows.Count; t++)
- {
- if (this.dgv2.Rows[t].Cells["Pgm_ProductNumber2"].Value.ToString().Trim() == frm.mlist[i].Prod_Number.Trim())
- {
- this.dgv2.Rows[t].Cells["Pgm_Quantity2"].Value = (Convert.ToInt32(this.dgv2.Rows[t].Cells["Pgm_Quantity2"].Value) + 1);
- IsFind = true;
- }
- }
- if (!IsFind)
- {
- DataGridViewRow dgvr = new DataGridViewRow();
- DataGridViewCell cell = null;
- cell = new DataGridViewTextBoxCell();
- cell.Value = 0;
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = frm.mlist[i].Prod_Number;
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = frm.mlist[i].Prod_Name;
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = "1";
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = frm.mlist[i].Prod_CostPrice;
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = frm.mlist[i].Prod_SalesPrice;
- dgvr.Cells.Add(cell);
- this.dgv2.Rows.Add(dgvr);
- }
- }
- }
- this.GetCostSellingPrice();
- }
- /// <summary>
- /// 更改数量事件
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- protected override void dgv2_CellValueChanged(object sender, DataGridViewCellEventArgs e)
- {
- if (this.dgv2.Rows.Count > 0)
- {
- if (!Command.Command_Validate.IsNumber(this.dgv2.CurrentRow.Cells["Pgm_Quantity2"].Value.ToString()))
- {
- MessageBoxCustom.Show("只能输入纯数字!");
- this.dgv2.CurrentRow.Cells["Pgm_Quantity2"].Value = "1";
- return;
- }
- this.GetCostSellingPrice();
- }
- }
- /// <summary>
- /// 婚纱景点==删除
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- protected override void btnDelete3_Click(object sender, EventArgs e)
- {
- try
- {
- if (this.tab.SelectedTab.Name.Equals(this.tab.TabPages[0].Name))
- {
- if (this.dgv3.Rows.Count > 0)
- {
- if (MessageBoxCustom.Show("你确定要删除吗?", "删除提示", MessageBoxButtons.YesNo) == DialogResult.Yes)
- {
- //删除
- if (this.dgv3.SelectedRows.Count > 0)
- {
- int Id = Convert.ToInt32(this.dgv3.CurrentRow.Cells["ID3"].Value.ToString());
- if (Id == 0)
- { this.dgv3.Rows.RemoveAt(this.dgv3.CurrentRow.Index); }
- if (Id > 0)
- {
- if (pkgmbll.Delete(Id) == true)
- { this.dgv3.Rows.RemoveAt(this.dgv3.CurrentRow.Index); }
- }
- this.GetCostSellingPrice();
- }
- }
- }
- }
- else if (this.tab.SelectedTab.Name.Equals(this.tab.TabPages[1].Name))
- {
- if (this.dgv4.Rows.Count > 0)
- {
- if (MessageBoxCustom.Show("你确定要删除吗?", "删除提示", MessageBoxButtons.YesNo) == DialogResult.Yes)
- {
- //删除
- if (this.dgv4.SelectedRows.Count > 0)
- {
- int Id = Convert.ToInt32(this.dgv4.CurrentRow.Cells["ID4"].Value.ToString());
- if (Id == 0)
- { this.dgv4.Rows.RemoveAt(this.dgv4.CurrentRow.Index); }
- if (Id > 0)
- {
- if (pkgmbll.Delete(Id) == true)
- { this.dgv4.Rows.RemoveAt(this.dgv4.CurrentRow.Index); }
- }
- this.GetCostSellingPrice();
- }
- }
- }
- }
- }
- catch (Exception ex)
- { MessageBoxCustom.Show(ex.Message); }
- }
- /// <summary>
- /// 婚纱景点==景点工具箱
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- protected override void btnToolbox3_Click(object sender, EventArgs e)
- {
- try
- {
- if (string.IsNullOrEmpty(this.CtvPak_Name.Text))
- { MessageBoxCustom.Show("请选择套系名称!"); return; }
- LYFZ.Software.MainBusiness.InitialSet.PackagesGoods.FrmTheScenery set = new PackagesGoods.FrmTheScenery();
- if (this.tab.SelectedTab.Name.Equals(this.tab.TabPages[0].Name))
- {
- #region
- set.StrSightsType = "0";
- set.ShowDialog();
- ArrayList ListArray = set.ListArray;
- if (ListArray.Count > 0)
- {
- for (int i = 0; i < ListArray.Count; i++)
- {
- bool IsFind = false;
- for (int t = 0; t < this.dgv3.Rows.Count; t++)
- {
- if (this.dgv3.Rows[t].Cells["Pgm_ProductNumber3"].Value.ToString().Trim() == ListArray[i].ToString().Trim())
- { IsFind = true; break; }
- }
- if (!IsFind)
- {
- ListItem listitem = (ListItem)ListArray[i];
- DataTable dt = tsbll.GetList("ID='" + listitem.StrValue + "'").Tables[0];
- DataGridViewRow dgvr = new DataGridViewRow();
- DataGridViewCell cell = null;
- cell = new DataGridViewTextBoxCell();
- cell.Value = 0;
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dt.Rows[0]["ID"].ToString().Trim();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dt.Rows[0]["Tsc_Name"].ToString().Trim();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = "1";
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dt.Rows[0]["Tsc_CostPrice"].ToString().Trim();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dt.Rows[0]["Tsc_SalesPrice"].ToString().Trim();
- dgvr.Cells.Add(cell);
- this.dgv3.Rows.Add(dgvr);
- }
- }
- }
- #endregion
- }
- else if (this.tab.SelectedTab.Name.Equals(this.tab.TabPages[1].Name))
- {
- #region
- set.StrSightsType = "1";
- set.ShowDialog();
- ArrayList ListArray = set.ListArray;
- if (ListArray.Count > 0)
- {
- for (int i = 0; i < ListArray.Count; i++)
- {
- bool IsFind = false;
- for (int t = 0; t < this.dgv4.Rows.Count; t++)
- {
- if (this.dgv4.Rows[t].Cells["Pgm_ProductNumber4"].Value.ToString().Trim() == ListArray[i].ToString().Trim())
- { IsFind = true; break; }
- }
- if (!IsFind)
- {
- ListItem listitem = (ListItem)ListArray[i];
- DataTable dt = tsbll.GetList("ID='" + listitem.StrValue + "'").Tables[0];
- DataGridViewRow dgvr = new DataGridViewRow();
- DataGridViewCell cell = null;
- cell = new DataGridViewTextBoxCell();
- cell.Value = 0;
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dt.Rows[0]["ID"].ToString().Trim();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dt.Rows[0]["Tsc_Name"].ToString().Trim();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = "1";
- dgvr.Cells.Add(cell);
- this.dgv4.Rows.Add(dgvr);
- }
- }
- }
- #endregion
- }
- this.GetCostSellingPrice();
- }
- catch (Exception ex)
- { MessageBoxCustom.Show(ex.Message); }
- }
- /// <summary>
- /// 更改数量事件
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- protected override void dgv3_CellValueChanged(object sender, DataGridViewCellEventArgs e)
- {
- if (this.dgv3.Rows.Count > 0)
- {
- if (!Command.Command_Validate.IsNumber(this.dgv3.CurrentRow.Cells["Pgm_Quantity3"].Value.ToString()))
- {
- MessageBoxCustom.Show("只能输入纯数字!");
- this.dgv3.CurrentRow.Cells["Pgm_Quantity3"].Value = "1";
- return;
- }
- this.GetCostSellingPrice();
- }
- }
- /// <summary>
- /// 更改数量事件
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- protected override void dgv4_CellValueChanged(object sender, DataGridViewCellEventArgs e)
- {
- if (this.dgv4.Rows.Count > 0)
- {
- if (!Command.Command_Validate.IsNumber(this.dgv4.CurrentRow.Cells["Pgm_Quantity4"].Value.ToString()))
- {
- MessageBoxCustom.Show("只能输入纯数字!");
- this.dgv4.CurrentRow.Cells["Pgm_Quantity4"].Value = "1";
- return;
- }
- }
- }
- /// <summary>
- /// 选择版本获取商品成本价,卖价
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- protected override void tab_SelectedIndexChanged(object sender, EventArgs e)
- {
- if (!this.IsFirstLoad)
- {
- if (this.tab.SelectedTab != null)
- {
- if (this.tab.SelectedTab.Name.Trim() == "tabPage2")
- {
- this.btnDown.Visible = true;
- this.btnUp.Visible = true;
- }
- else
- {
- this.btnDown.Visible = false;
- this.btnUp.Visible = false;
- }
- this.GetCostSellingPrice();
- }
- }
- }
- /// <summary>
- /// 获取商品成本价,卖价
- /// </summary>
- public void GetCostSellingPrice()
- {
- decimal Prod_CostPrice = 0;
- decimal Prod_SalesPrice = 0;
- decimal Prod_CostPrice2 = 0;
- decimal Prod_SalesPrice2 = 0;
- decimal Prod_CostPrice3 = 0;
- decimal Prod_SalesPrice3 = 0;
- decimal Prod_CostPrice4 = 0;
- decimal Prod_SalesPrice4 = 0;
- //decimal Prod_CostPrice5 = 0;
- //decimal Prod_SalesPrice5 = 0;
- //套系赠送商品
- for (int i = 0; i < this.dgv1.Rows.Count; i++)
- {
- //成本价
- Prod_CostPrice += Convert.ToDecimal(Convert.ToDecimal(this.dgv1.Rows[i].Cells["Prod_CostPrice"].Value) * Convert.ToDecimal(this.dgv1.Rows[i].Cells["Pgm_Quantity"].Value));
- //卖价
- Prod_SalesPrice += Convert.ToDecimal(Convert.ToDecimal(this.dgv1.Rows[i].Cells["Prod_SalesPrice"].Value) * Convert.ToDecimal(this.dgv1.Rows[i].Cells["Pgm_Quantity"].Value));
- }
- //服务
- for (int i = 0; i < this.dgv2.Rows.Count; i++)
- {
- //成本价
- Prod_CostPrice2 += Convert.ToDecimal(Convert.ToDecimal(this.dgv2.Rows[i].Cells["Prod_CostPrice2"].Value) * Convert.ToDecimal(this.dgv2.Rows[i].Cells["Pgm_Quantity2"].Value));
- //卖价
- Prod_SalesPrice2 += Convert.ToDecimal(Convert.ToDecimal(this.dgv2.Rows[i].Cells["Prod_SalesPrice2"].Value) * Convert.ToDecimal(this.dgv2.Rows[i].Cells["Pgm_Quantity2"].Value));
- }
- //婚纱景点设置
- for (int i = 0; i < this.dgv3.Rows.Count; i++)
- {
- //成本价
- Prod_CostPrice3 += Convert.ToDecimal(Convert.ToDecimal(this.dgv3.Rows[i].Cells["Prod_CostPrice3"].Value) * Convert.ToDecimal(this.dgv3.Rows[i].Cells["Pgm_Quantity3"].Value));
- //卖价
- Prod_SalesPrice3 += Convert.ToDecimal(Convert.ToDecimal(this.dgv3.Rows[i].Cells["Prod_SalesPrice3"].Value) * Convert.ToDecimal(this.dgv3.Rows[i].Cells["Pgm_Quantity3"].Value));
- }
- //儿童与婚纱区分版本
- //版本判断
- switch (LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.GetBusinessType())
- {
- case LYFZ.Software.MainBusiness.EnumPermissions.BusinessType.儿童版:
- this.lblCBJ.Text = Convert.ToDecimal(Prod_CostPrice + Prod_CostPrice2).ToString("N2");
- this.lblMJ.Text = Convert.ToDecimal(Prod_SalesPrice + Prod_SalesPrice2).ToString("N2");
- break;
- case LYFZ.Software.MainBusiness.EnumPermissions.BusinessType.婚纱版:
- this.lblCBJ.Text = Convert.ToDecimal(Prod_CostPrice + Prod_CostPrice2 + Prod_CostPrice3).ToString("N2");
- this.lblMJ.Text = Convert.ToDecimal(Prod_SalesPrice + Prod_SalesPrice2 + Prod_SalesPrice3).ToString("N2");
- break;
- default:
- this.lblCBJ.Text = Convert.ToDecimal(Prod_CostPrice + Prod_CostPrice2 + Prod_CostPrice3 + Prod_CostPrice4).ToString("N2");
- this.lblMJ.Text = Convert.ToDecimal(Prod_SalesPrice + Prod_SalesPrice2 + Prod_SalesPrice3 + Prod_SalesPrice4).ToString("N2");
- break;
- }
- }
- /// <summary>
- /// 保存
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- protected override void btnSave1_Click(object sender, EventArgs e)
- {
- try
- {
- #region 判断值是否为空
- if (string.IsNullOrEmpty(this.CtvPak_Name.Text))
- {
- MessageBoxCustom.Show("请选择套系名称!");
- return;
- }
- if (string.IsNullOrEmpty(this.StrPakPackagesID))
- {
- MessageBoxCustom.Show(this.CtvPak_Name.Text.ToString() + " 此类型无套系名称!请添加套系名称");
- this.CtvPak_Name.Text = "";
- return;
- }
- decimal CBJ = Convert.ToDecimal(this.lblCBJ.Text);
- decimal UnitPrice = Convert.ToDecimal(this.StrPakUnitPrice);
- if (UnitPrice <= CBJ)
- {
- if (MessageBoxCustom.Show("套系价格必须大于商品成本价!是否继续保存?", "温馨提示", MessageBoxButtons.YesNo) == DialogResult.No)
- { return; }
- }
- #endregion
- #region 获取类别名称和类别编号
- DataTable dtpackages = packages.GetList("Pak_PackagesID='" + this.StrPakPackagesID + "'").Tables[0];
- string Pak_PackagesClass = "";
- string Pak_Name = "";
- if (dtpackages.Rows.Count > 0)
- {
- Pak_PackagesClass = dtpackages.Rows[0]["Pak_PackagesClass"].ToString();
- Pak_Name = dtpackages.Rows[0]["Pak_Name"].ToString();
- }
- #endregion
- LYFZ.Model.Model_ErpPackagesGiftMerchandise model = null;
- List<Helper.CommandInfo> clist = new List<Helper.CommandInfo>();
- #region 增加,修改赠送商品
- if (this.dgv1.Rows.Count > 0)
- {
- for (int i = 0; i < this.dgv1.Rows.Count; i++)
- {
- //增加
- int Id = Convert.ToInt32(this.dgv1.Rows[i].Cells["ID"].Value.ToString());
- string Pgm_ProductNumber = this.dgv1.Rows[i].Cells["Pgm_ProductNumber"].Value.ToString();
- string Pgm_ProductName = this.dgv1.Rows[i].Cells["Pgm_ProductName"].Value.ToString();
- int Pgm_Quantity = Convert.ToInt32(this.dgv1.Rows[i].Cells["Pgm_Quantity"].Value.ToString());
- if (Id == 0)
- {
- model = new Model.Model_ErpPackagesGiftMerchandise();
- model.Pgm_GiveType = 0;
- model.Pgm_ProductNumber = Pgm_ProductNumber;
- model.Pgm_Quantity = Pgm_Quantity;
- model.Pgm_StageNumber = "";
- model.Pgm_ProductName = Pgm_ProductName;
- model.Pgm_StageName = "";
- model.Pgm_PackagesNumber = Pak_PackagesClass;
- model.Pgm_PackagesName = Pak_Name;
- model.Pgm_PackagesCode = this.StrPakPackagesID;
- clist.Add(pkgmbll.GetAddCommandInfo(model));
- }
- //修改
- if (Id > 0)
- {
- model = new Model.Model_ErpPackagesGiftMerchandise();
- model = pkgmbll.GetModel(Id);
- model.Pgm_Quantity = Pgm_Quantity;
- model.Pgm_PackagesName = Pak_Name;
- clist.Add(pkgmbll.GetUpdateCommandInfo(model));
- }
- }
- }
- #endregion
- #region 增加,修改服务内容
- if (this.dgv2.Rows.Count > 0)
- {
- for (int i = 0; i < this.dgv2.Rows.Count; i++)
- {
- //增加
- int Id = Convert.ToInt32(this.dgv2.Rows[i].Cells["ID2"].Value.ToString());
- string Pgm_ProductNumber = this.dgv2.Rows[i].Cells["Pgm_ProductNumber2"].Value.ToString();
- string Pgm_ProductName = this.dgv2.Rows[i].Cells["Pgm_ProductName2"].Value.ToString();
- int Pgm_Quantity = Convert.ToInt32(this.dgv2.Rows[i].Cells["Pgm_Quantity2"].Value.ToString());
- if (Id == 0)
- {
- model = new Model.Model_ErpPackagesGiftMerchandise();
- model.Pgm_GiveType = 1;
- model.Pgm_ProductNumber = Pgm_ProductNumber;
- model.Pgm_Quantity = Pgm_Quantity;
- model.Pgm_PackagesNumber = Pak_PackagesClass;
- model.Pgm_StageNumber = "";
- model.Pgm_ProductName = Pgm_ProductName;
- model.Pgm_PackagesName = Pak_Name;
- model.Pgm_StageName = "";
- model.Pgm_PackagesCode = this.StrPakPackagesID;
- clist.Add(pkgmbll.GetAddCommandInfo(model));
- }
- //修改
- else if (Id > 0)
- {
- model = pkgmbll.GetModel(Id);
- model.Pgm_Quantity = Pgm_Quantity;
- model.Pgm_PackagesName = Pak_Name;
- clist.Add(pkgmbll.GetUpdateCommandInfo(model));
- }
- }
- }
- #endregion
- #region 增加婚纱景点
- if (this.dgv3.Rows.Count > 0)
- {
- for (int i = 0; i < this.dgv3.Rows.Count; i++)
- {
- //增加
- int Id = Convert.ToInt32(this.dgv3.Rows[i].Cells["ID3"].Value.ToString());
- string Pgm_ProductNumber = this.dgv3.Rows[i].Cells["Pgm_ProductNumber3"].Value.ToString();
- string Pgm_ProductName = this.dgv3.Rows[i].Cells["Pgm_ProductName3"].Value.ToString();
- int Pgm_Quantity = Convert.ToInt32(this.dgv3.Rows[i].Cells["Pgm_Quantity3"].Value.ToString());
- if (Id == 0)
- {
- model = new Model.Model_ErpPackagesGiftMerchandise();
- model.Pgm_GiveType = 2;
- model.Pgm_ProductNumber = Pgm_ProductNumber;
- model.Pgm_Quantity = Pgm_Quantity;
- model.Pgm_PackagesNumber = Pak_PackagesClass;
- model.Pgm_StageNumber = "";
- model.Pgm_ProductName = Pgm_ProductName;
- model.Pgm_PackagesName = Pak_Name;
- model.Pgm_StageName = "";
- model.Pgm_PackagesCode = this.StrPakPackagesID;
- clist.Add(pkgmbll.GetAddCommandInfo(model));
- }
- //修改
- else if (Id > 0)
- {
- model = pkgmbll.GetModel(Id);
- model.Pgm_Quantity = Pgm_Quantity;
- model.Pgm_PackagesName = Pak_Name;
- clist.Add(pkgmbll.GetUpdateCommandInfo(model));
- }
- }
- }
- #endregion
- #region 增加儿童景点
- if (this.dgv4.Rows.Count > 0)
- {
- for (int i = 0; i < this.dgv4.Rows.Count; i++)
- {
- //增加
- int Id = Convert.ToInt32(this.dgv4.Rows[i].Cells["ID4"].Value.ToString());
- string Pgm_ProductNumber = this.dgv4.Rows[i].Cells["Pgm_ProductNumber4"].Value.ToString();
- string Pgm_ProductName = this.dgv4.Rows[i].Cells["Pgm_ProductName4"].Value.ToString();
- int Pgm_Quantity = Convert.ToInt32(this.dgv4.Rows[i].Cells["Pgm_Quantity4"].Value.ToString());
- if (Id == 0)
- {
- model = new Model.Model_ErpPackagesGiftMerchandise();
- model.Pgm_GiveType = 3;
- model.Pgm_ProductNumber = Pgm_ProductNumber;
- model.Pgm_Quantity = Pgm_Quantity;
- model.Pgm_PackagesNumber = Pak_PackagesClass;
- model.Pgm_StageNumber = "";
- model.Pgm_ProductName = Pgm_ProductName;
- model.Pgm_PackagesName = Pak_Name;
- model.Pgm_StageName = "";
- model.Pgm_PackagesCode = this.StrPakPackagesID;
- clist.Add(pkgmbll.GetAddCommandInfo(model));
- }
- //修改
- else if (Id > 0)
- {
- model = pkgmbll.GetModel(Id);
- model.Pgm_Quantity = Pgm_Quantity;
- model.Pgm_PackagesName = Pak_Name;
- clist.Add(pkgmbll.GetUpdateCommandInfo(model));
- }
- }
- }
- #endregion
- if (clist.Count > 0)
- {
- if (LYFZ.BLL.BaseBllOperate.ExecuteSqlTran(clist) > 0)
- {
- this.IsSaveed = true;
- this.Bind();
- this.GetCostSellingPrice();
- MessageBoxCustom.Show("保存成功!");
- }
- else
- { MessageBoxCustom.Show("保存失败!"); }
- }
- }
- catch (Exception ex)
- { MessageBoxCustom.Show(ex.Message); }
- }
- /// <summary>
- /// 设置套系
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- protected override void btnProductSet_Click(object sender, EventArgs e)
- {
- LYFZ.Software.MainBusiness.InitialSet.FrmPackagesSet set = new FrmPackagesSet();
- set.ShowDialog();
- if (set.IsSaveed)
- {
- this.CtvPak_Name.Text = "";
- this.lblCBJ.Text = "0.00";
- this.lblMJ.Text = "0.00";
- this.IsPackagesSet = true;
- this.FrmPackagesGoodsSet_Shown(sender, e);
- }
- }
- /// <summary>
- /// 窗体大小发生变化
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- protected override void FrmPackagesGoodsSet_Resize(object sender, EventArgs e)
- {
- if (this.WindowState == FormWindowState.Maximized)
- { this.panelEx2.Size = new Size(950, this.Height - 85); }
- else
- { this.panelEx2.Size = new Size(950, 525); }
- }
- /// <summary>
- /// 拍摄次数下移
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void btnDown_Click(object sender, EventArgs e)
- {
- if (this.dgv4.Rows.Count > 0)
- {
- //得到当前选中行的索引
- int rowIndex = this.dgv4.SelectedRows[0].Index;
- if (rowIndex == this.dgv4.Rows.Count - 1)
- { return; }
- List<string> list = new List<string>();
- //把当前选中行的数据存入list数组中
- for (int i = 0; i < this.dgv4.Columns.Count; i++)
- { list.Add(this.dgv4.SelectedRows[0].Cells[i].Value.ToString()); }
- for (int j = 0; j < this.dgv4.Columns.Count; j++)
- {
- if (j > 0)
- {
- this.dgv4.Rows[rowIndex].Cells[j].Value = this.dgv4.Rows[rowIndex + 1].Cells[j].Value;
- this.dgv4.Rows[rowIndex + 1].Cells[j].Value = list[j].ToString();
- }
- }
- int dk = this.dgv4.CurrentRow.Index;
- this.dgv4.Rows[rowIndex].Selected = false;
- this.dgv4.Rows[rowIndex + 1].Selected = true;
- }
- }
- /// <summary>
- /// 拍摄次数上移
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void btnUp_Click(object sender, EventArgs e)
- {
- if (this.dgv4.Rows.Count > 0)
- {
- //得到当前选中行的索引
- int rowIndex = this.dgv4.SelectedRows[0].Index;
- if (rowIndex == 0)
- { return; }
- List<string> list = new List<string>();
- //把当前选中行的数据存入list数组中
- for (int i = 0; i < this.dgv4.Columns.Count; i++)
- { list.Add(this.dgv4.SelectedRows[0].Cells[i].Value.ToString()); }
- for (int j = 0; j < this.dgv4.Columns.Count; j++)
- {
- if (j > 0)
- {
- this.dgv4.Rows[rowIndex].Cells[j].Value = this.dgv4.Rows[rowIndex - 1].Cells[j].Value;
- this.dgv4.Rows[rowIndex - 1].Cells[j].Value = list[j].ToString();
- }
- }
- this.dgv4.Rows[rowIndex].Selected = false;
- this.dgv4.Rows[rowIndex - 1].Selected = true;
- }
- }
- /// <summary>
- /// 窗体关闭前
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void FrmPackagesGoodsSet_FormClosing(object sender, FormClosingEventArgs e)
- {
- if (!this.IsSaveed)
- {
- if (this.IsPackagesSet)
- { this.IsSaveed = this.IsPackagesSet; }
- }
- }
- }
- }
|