diff --git a/WCS.BLL/DbModels/STZL/MatDetailCurrentInfo.cs b/WCS.BLL/DbModels/STZL/MatDetailCurrentInfo.cs
index 541bc54..a02432e 100644
--- a/WCS.BLL/DbModels/STZL/MatDetailCurrentInfo.cs
+++ b/WCS.BLL/DbModels/STZL/MatDetailCurrentInfo.cs
@@ -39,11 +39,11 @@ namespace WCS.BLL.DbModels
[SugarColumn(ColumnName = "shelf_type", Length = 64, IsNullable = true, ColumnDescription = "货架类型")]
public string ShelfType { get; set; }
- ///
- /// 货架区域
- ///
- [SugarColumn(ColumnName = "shelf_area", Length = 64, IsNullable = true, ColumnDescription = "货架区域")]
- public string ShelfArea { get; set; }
+ /////
+ ///// 货架区域
+ /////
+ //[SugarColumn(ColumnName = "shelf_area", Length = 64, IsNullable = true, ColumnDescription = "货架区域")]
+ //public string ShelfArea { get; set; }
#endregion
#region 物料属性
diff --git a/WCS.BLL/DbModels/STZL/ShelfInfo.cs b/WCS.BLL/DbModels/STZL/ShelfInfo.cs
index d9ef57d..4ce3558 100644
--- a/WCS.BLL/DbModels/STZL/ShelfInfo.cs
+++ b/WCS.BLL/DbModels/STZL/ShelfInfo.cs
@@ -41,11 +41,11 @@ namespace WCS.DAL.DbModels
[SugarColumn(ColumnName = "shelf_status", IsNullable = true, ColumnDescription = "货架状态")]
public ShelfStatusEnum ShelfStatus { get; set; } = ShelfStatusEnum.空货架;
- ///
- /// 货架区域
- ///
- [SugarColumn(ColumnName = "shelf_area", Length = 64, IsNullable = true, ColumnDescription = "货架区域")]
- public string ShelfArea { get; set; }
+ /////
+ ///// 货架区域
+ /////
+ //[SugarColumn(ColumnName = "shelf_area", Length = 64, IsNullable = true, ColumnDescription = "货架区域")]
+ //public string ShelfArea { get; set; }
///
/// 货架尺寸
diff --git a/WCS.BLL/Services/IService/IMatDetailCurrentInfoService.cs b/WCS.BLL/Services/IService/IMatDetailCurrentInfoService.cs
index da94c27..68139f7 100644
--- a/WCS.BLL/Services/IService/IMatDetailCurrentInfoService.cs
+++ b/WCS.BLL/Services/IService/IMatDetailCurrentInfoService.cs
@@ -1,14 +1,9 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using WCS.Model.ApiModel.User;
-using WCS.Model;
+using WCS.Model;
using WCS.DAL.DbModels;
using WCS.Model.ApiModel.StoreInfo;
using WCS.BLL.DbModels;
using WCS.Model.ApiModel.MatBaseInfo;
+using WCS.Model.ApiModel.MatDetailCurrentInfo;
namespace WCS.BLL.Services.IService
{
@@ -19,7 +14,7 @@ namespace WCS.BLL.Services.IService
///
///
///
- public Task> GetMatDetailCurrentInfos(GetMatDetailCurrentInfosRequest request);
+ public Task> GetMatDetailCurrentInfos(GetMatDetailCurrentInfosRequest request);
///
/// 更新货架存量
diff --git a/WCS.BLL/Services/Service/MatDetailCurrentInfoService.cs b/WCS.BLL/Services/Service/MatDetailCurrentInfoService.cs
index 84d6f50..8bd99ab 100644
--- a/WCS.BLL/Services/Service/MatDetailCurrentInfoService.cs
+++ b/WCS.BLL/Services/Service/MatDetailCurrentInfoService.cs
@@ -18,6 +18,7 @@ using WCS.Model;
using WCS.Model.ApiModel;
using WCS.Model.ApiModel.InOutRecord;
using WCS.Model.ApiModel.MatBaseInfo;
+using WCS.Model.ApiModel.MatDetailCurrentInfo;
using WCS.Model.ApiModel.StoreInfo;
using WCS.Model.ApiModel.User;
@@ -26,7 +27,7 @@ namespace WCS.BLL.Services.Service
public class MatDetailCurrentInfoService : IMatDetailCurrentInfoService
{
- public async Task> GetMatDetailCurrentInfos(GetMatDetailCurrentInfosRequest request)
+ public async Task> GetMatDetailCurrentInfos(GetMatDetailCurrentInfosRequest request)
{
try
{
@@ -39,12 +40,34 @@ namespace WCS.BLL.Services.Service
.WhereIF(request.ShelfTypeId != null && request.ShelfTypeId != 0, (mci, si, li) => si.ShelfTypeId == request.ShelfTypeId)
.WhereIF(!string.IsNullOrEmpty(request.ShelfCode), (mci, si, li) => si.ShelfCode.Contains(request.ShelfCode))
.WhereIF(!string.IsNullOrEmpty(request.MatCode), (mci, si, li) => mci.MatCode.Contains(request.MatCode))
- .WhereIF(!string.IsNullOrEmpty(request.MatName), (mci, si, li) => mci.MatCode.Contains(request.MatName))
- .Select((mci, si, li) => mci);
+ .WhereIF(!string.IsNullOrEmpty(request.MatName), (mci, si, li) => mci.MatName.Contains(request.MatName))
+ .Select((mci, si, li) => new MatDetailCurrentInfoModel()
+ {
+ Id = mci.Id,
+ ShlefId = mci.ShlefId,
+ ShelfCode = mci.ShelfCode,
+ ShelfType = mci.ShelfType,
+
+ LocationArea = li.LocationArea,
+ LocationCode = li.LocationCode,
+
+ MatCode = mci.MatCode,
+ MatName = mci.MatName,
+ MatSpec = mci.MatSpec,
+ MatUnit = mci.MatUnit,
+ MatCustomer = mci.MatCustomer,
+ MatQty = mci.MatQty,
+ MatSupplier = mci.MatSupplier,
+
+ StationCode = mci.StationCode,
+ ModifyUser = mci.ModifyUser,
+ ModifyTime = mci.ModifyTime
+ });
//分页
var totalCount = await recordsQueryable.CountAsync();
var records = await recordsQueryable
+ .OrderByDescending(mci => mci.Id)
.Skip((request.PageNumber - 1) * request.PageSize).Take(request.PageSize)
.ToListAsync();
//生成序号
@@ -52,11 +75,11 @@ namespace WCS.BLL.Services.Service
{
records[i].RowNumber = (request.PageNumber - 1) * request.PageSize + i + 1;
}
- return new PageQueryResponse()
+ return new PageQueryResponse()
{
Code = 200,
Message = $"success",
- Data = new PageQueryResponseData()
+ Data = new PageQueryResponseData()
{
TotalCount = totalCount,
MaxPage = request.PageSize == 0 ? 0 : (int)Math.Ceiling((decimal)totalCount / request.PageSize),
@@ -67,7 +90,7 @@ namespace WCS.BLL.Services.Service
}
catch (Exception ex)
{
- return new PageQueryResponse()
+ return new PageQueryResponse()
{
Code = 300,
Message = $"操作失败:{ex.Message}",
@@ -77,119 +100,58 @@ namespace WCS.BLL.Services.Service
public async Task> updateMatDetailCurrentInfo(AddLocaionInfoRequest request)
{
- return null;
- //try
- //{
- // var MatDetailCurrentInfo = await DbHelp.db.Queryable() //.Where(t => t.MatDetailCurrentCode == request.MatDetailCurrentInfo.MatDetailCurrentCode)
- // .FirstAsync();
- // //修改位置信息
- // if (request.AddOrUpdate == AddOrUpdate.Update)
- // {
- // var existId = MatDetailCurrentInfo == null ? 0 : MatDetailCurrentInfo.Id;
+ try
+ {
+ var matDetailCurrentInfo = await DbHelp.db.Queryable() //.Where(t => t.MatDetailCurrentCode == request.MatDetailCurrentInfo.MatDetailCurrentCode)
+ .Where(t => t.Id == request.LocationInfo.Id)
+ .FirstAsync();
+ if (matDetailCurrentInfo == null)
+ {
+ return new ResponseCommon
public ShelfStatusEnum ShelfStatus { get; set; } = ShelfStatusEnum.空货架;
- ///
- /// 货架区域
- ///
- public string ShelfArea { get; set; } = string.Empty;
+ /////
+ ///// 货架区域
+ /////
+ //public string ShelfArea { get; set; } = string.Empty;
///
/// 货架尺寸
diff --git a/WCS.WebApi/Controllers/MatDetailCurrenInfoController.cs b/WCS.WebApi/Controllers/MatDetailCurrenInfoController.cs
index da9abf3..e6a2b71 100644
--- a/WCS.WebApi/Controllers/MatDetailCurrenInfoController.cs
+++ b/WCS.WebApi/Controllers/MatDetailCurrenInfoController.cs
@@ -1,15 +1,11 @@
using Microsoft.AspNetCore.Mvc;
using WCS.BLL.Services.IService;
using WCS.BLL.Services.Service;
-using WCS.Model.ApiModel.MatInventoryDetail;
using WCS.Model;
using WCS.Model.ApiModel.StoreInfo;
using WCS.BLL.DbModels;
using WCS.Model.ApiModel.MatBaseInfo;
-using WCS.DAL.DbModels;
-using WCS.DAL.Db;
-using WCS.Model.ApiModel.Home;
-using WCS.Model.ApiModel.LocationInfo;
+using WCS.Model.ApiModel.MatDetailCurrentInfo;
namespace WCS.WebApi.Controllers
{
@@ -34,14 +30,14 @@ namespace WCS.WebApi.Controllers
return await _matDetailCurrentInfoService.GetMatDetailCurrentInfos(request);
}
- [HttpPost("updateLocationInfo")]
- public async Task> updateLocationInfo(AddLocaionInfoRequest request)
+ [HttpPost("updateMatDetailCurrentInfo")]
+ public async Task> updateMatDetailCurrentInfo(AddLocaionInfoRequest request)
{
return await _matDetailCurrentInfoService.updateMatDetailCurrentInfo(request);
}
- [HttpPost("deleteLocationInfo")]
- public async Task> deleteLocationInfo(DeleteInfosRequest request)
+ [HttpPost("deleteMatDetailCurrentInfo")]
+ public async Task> deleteMatDetailCurrentInfo(DeleteInfosRequest request)
{
return await _matDetailCurrentInfoService.deleteMatDetailCurrentInfo(request);
}
diff --git a/WCS.WebApi/Controllers/PDAMatBindController.cs b/WCS.WebApi/Controllers/PDAMatBindController.cs
index c8210d1..76a4818 100644
--- a/WCS.WebApi/Controllers/PDAMatBindController.cs
+++ b/WCS.WebApi/Controllers/PDAMatBindController.cs
@@ -193,7 +193,7 @@ namespace WCS.WebApi.Controllers
ShlefId = shelf.Id,
ShelfCode = shelf.ShelfCode,
ShelfType = shelf.ShelfTypeName,
- ShelfArea = shelf.ShelfArea,
+ //ShelfArea = shelf.ShelfArea,
MatCode = matBaseInfo.MatCode,
MatName = matBaseInfo.MatName,
diff --git a/货架标准上位机/ViewModels/MatDetailCurrentInfoUpdateViewModel.cs b/货架标准上位机/ViewModels/MatDetailCurrentInfoUpdateViewModel.cs
new file mode 100644
index 0000000..2d59a03
--- /dev/null
+++ b/货架标准上位机/ViewModels/MatDetailCurrentInfoUpdateViewModel.cs
@@ -0,0 +1,149 @@
+using HandyControl.Controls;
+using Ping9719.WpfEx.Mvvm;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Security.AccessControl;
+using System.Security.Cryptography.X509Certificates;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Web.UI.WebControls;
+using System.Windows.Controls;
+using TouchSocket.Core;
+using WCS.Model;
+using WCS.Model.ApiModel.Home;
+using WCS.Model.ApiModel.MatDetailCurrentInfo;
+using WCS.Model.ApiModel.StoreInfo;
+using 智慧物流软件系统.Tool;
+
+namespace 智慧物流软件系统.ViewModel
+{
+ public class MatDetailCurrentInfoUpdateViewModel : BindableBase
+ {
+ public MatDetailCurrentInfoModel model { get; set; }
+
+ public System.Windows.Controls.TextBox textBox { get; set; }
+
+ #region Property 属性
+ public void SetValues(MatDetailCurrentInfoModel matDetailCurrentInfoModel)
+ {
+ model = matDetailCurrentInfoModel;
+
+ ShelfType = matDetailCurrentInfoModel.ShelfType;
+ ShelfCode = matDetailCurrentInfoModel.ShelfCode;
+
+ LocationArea = matDetailCurrentInfoModel.LocationArea;
+ LocationCode = matDetailCurrentInfoModel.LocationCode;
+
+ MatName = matDetailCurrentInfoModel.MatName;
+ MatCode = matDetailCurrentInfoModel.MatCode;
+ MatSpec = matDetailCurrentInfoModel.MatSpec;
+ MatQty = matDetailCurrentInfoModel.MatQty;
+
+ if (textBox != null)
+ Task.Run(() =>
+ {
+ Thread.Sleep(100);
+ App.Current.Dispatcher.Invoke(() =>
+ {
+ textBox.Focus();
+ });
+ });
+
+ }
+
+ public MatDetailCurrentInfoModel GetValues()
+ {
+ if (model == null)
+ {
+ return null;
+ }
+ model.MatQty = MatQty;
+ return model;
+ }
+
+ private string shelfCode;
+ public string ShelfCode
+ {
+ get { return shelfCode; }
+ set
+ {
+ SetProperty(ref shelfCode, value);
+ }
+ }
+
+ private string shelfType;
+ public string ShelfType
+ {
+ get { return shelfType; }
+ set
+ {
+ SetProperty(ref shelfType, value);
+ }
+ }
+
+ private string locationArea;
+
+ public string LocationArea
+ {
+ get { return locationArea; }
+ set
+ {
+ SetProperty(ref locationArea, value);
+ }
+ }
+
+ private string locationCode;
+
+ public string LocationCode
+ {
+ get { return locationCode; }
+ set
+ {
+ SetProperty(ref locationCode, value);
+ }
+ }
+
+ private string matCode;
+ public string MatCode
+ {
+ get { return matCode; }
+ set
+ {
+ SetProperty(ref matCode, value);
+ }
+ }
+
+
+ private string matName;
+ public string MatName
+ {
+ get { return matName; }
+ set
+ {
+ SetProperty(ref matName, value);
+ }
+ }
+
+ private string matSpec;
+ public string MatSpec
+ {
+ get { return matSpec; }
+ set
+ {
+ SetProperty(ref matSpec, value);
+ }
+ }
+
+ private int matQty;
+ public int MatQty
+ {
+ get { return matQty; }
+ set
+ {
+ SetProperty(ref matQty, value);
+ }
+ #endregion
+ }
+ }
+}
\ No newline at end of file
diff --git a/货架标准上位机/ViewModels/MatDetailCurrentInfoViewModel.cs b/货架标准上位机/ViewModels/MatDetailCurrentInfoViewModel.cs
index ff09a67..23a2473 100644
--- a/货架标准上位机/ViewModels/MatDetailCurrentInfoViewModel.cs
+++ b/货架标准上位机/ViewModels/MatDetailCurrentInfoViewModel.cs
@@ -20,6 +20,7 @@ using WCS.Model.ApiModel.User;
using WCS.Model.ApiModel;
using Newtonsoft.Json.Bson;
using WCS.Model.ApiModel.LocationInfo;
+using WCS.Model.ApiModel.MatDetailCurrentInfo;
namespace 智慧物流软件系统.ViewModel
{
@@ -31,8 +32,8 @@ namespace 智慧物流软件系统.ViewModel
}
#region Property
- private List dataGridItemSource;
- public List DataGridItemSource
+ private List dataGridItemSource;
+ public List DataGridItemSource
{
get { return dataGridItemSource; }
set
@@ -41,8 +42,8 @@ namespace 智慧物流软件系统.ViewModel
}
}
- private LocationInfoModel selectedataGridItem;
- public LocationInfoModel SelectedataGridItem
+ private MatDetailCurrentInfoModel selectedataGridItem;
+ public MatDetailCurrentInfoModel SelectedataGridItem
{
get { return selectedataGridItem; }
set
@@ -166,7 +167,7 @@ namespace 智慧物流软件系统.ViewModel
}
#endregion
- #region
+ #region 物料
///
/// 物料编码
///
@@ -194,7 +195,6 @@ namespace 智慧物流软件系统.ViewModel
}
#endregion
-
#endregion
#region Command
@@ -234,16 +234,21 @@ namespace 智慧物流软件系统.ViewModel
var dia = Dialog.Show(new TextDialog());
try
{
- var body = new GetLocationInfosRequest()
+ var body = new GetMatDetailCurrentInfosRequest()
{
LocationAreaId = SelectedLocationAreaItems == null ? null : SelectedLocationAreaItems.Id,
LocationCode = LocationCode,
+ ShelfTypeId = SelectedShelfTypeItem == null? null:selectedShelfTypeItem.Id,
+ ShelfCode = ShelfCode,
+ MatCode = MatCode,
+ MatName = MatName,
+
UserName = LocalStatic.CurrentUser,
DeviceType = LocalFile.Config.DeviceType,
PageNumber = CurrentPage,
PageSize = PageSize,
};
- var Result = ApiHelp.GetDataFromHttp>(LocalFile.Config.ApiIpHost + "locationInfo/getLocationInfos", body, "POST");
+ var Result = ApiHelp.GetDataFromHttp>(LocalFile.Config.ApiIpHost + "matDetailCurrenInfo/getMatDetailCurrentInfos", body, "POST");
if (Result != null && Result.Data != null && Result.Data.Lists != null)
{
DataGridItemSource = Result.Data.Lists;
@@ -262,23 +267,9 @@ namespace 智慧物流软件系统.ViewModel
#endregion
}
- ///
- /// 物料新增操作
- ///
- public ICommand BtnAddCommand { get => new DelegateCommand(BtnAdd); }
- public async void BtnAdd()
- {
- var addView = new LocationInfoAddOrUpdateView("新增位置");
- addView.ShowDialog();
- if (addView.DialogResult == true)
- {
- //添加或修改成功后重新查询
- CurrentPage = 1;
- }
- }
public ICommand BtnEditCommand { get => new DelegateCommand(BtnEdit); }
- public async void BtnEdit()
+ public void BtnEdit()
{
//查询勾选的第一个数据
var info = DataGridItemSource?.Where(t => t.IsSelected == true).FirstOrDefault();
@@ -288,9 +279,9 @@ namespace 智慧物流软件系统.ViewModel
}
else
{
- var addView = new LocationInfoAddOrUpdateView("修改位置", info);
- addView.ShowDialog();
- if (addView.DialogResult == true)
+ var updateView = new MatDetailCurrentInfoUpdateView("修改货架存量", info);
+ updateView.ShowDialog();
+ if (updateView.DialogResult == true)
{
CurrentPage = 1;
}
@@ -321,7 +312,7 @@ namespace 智慧物流软件系统.ViewModel
DeviceType = LocalFile.Config.DeviceType,
needDeleteIds = needDeleteIds,
};
- var Result = ApiHelp.GetDataFromHttp>(LocalFile.Config.ApiIpHost + "locationInfo/deleteLocationInfo", body, "POST");
+ var Result = ApiHelp.GetDataFromHttp>(LocalFile.Config.ApiIpHost + "matDetailCurrenInfo/deleteMatDetailCurrentInfo", body, "POST");
if (Result != null && Result.Code == 200)
{
BtnSearch();
@@ -335,33 +326,6 @@ namespace 智慧物流软件系统.ViewModel
}
return true;
});
-
- ////查询勾选的第一个数据
- //var info = DataGridItemSource?.Where(t => t.IsSelected == true).FirstOrDefault();
- //if (info == null)
- //{
- // Growl.Warning("请选择需要删除的数据!");
- //}
- //else
- //{
- // var body = new AddShelfInfoRequest()
- // {
- // UserName = LocalStatic.CurrentUser,
- // DeviceType = LocalFile.Config.DeviceType,
- // ShelfInfo = info,
- // AddOrUpdate = AddOrUpdate.Delete
- // };
- // var Result = ApiHelp.GetDataFromHttp>(LocalFile.Config.ApiIpHost + "storeInfo/addOrUpdateShelfInfo", body, "POST");
- // if (Result != null && Result.Code == 200)
- // {
- // Growl.Success("删除成功!");
- // CurrentPage = 1;
- // }
- // else
- // {
- // Growl.Error($"{Result?.Message?.ToString()}");
- // }
- //}
}
#endregion
diff --git a/货架标准上位机/Views/MatDetailCurrentInfoUpdateView.xaml b/货架标准上位机/Views/MatDetailCurrentInfoUpdateView.xaml
new file mode 100644
index 0000000..4f4c5c9
--- /dev/null
+++ b/货架标准上位机/Views/MatDetailCurrentInfoUpdateView.xaml
@@ -0,0 +1,156 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/货架标准上位机/Views/MatDetailCurrentInfoUpdateView.xaml.cs b/货架标准上位机/Views/MatDetailCurrentInfoUpdateView.xaml.cs
new file mode 100644
index 0000000..f20c274
--- /dev/null
+++ b/货架标准上位机/Views/MatDetailCurrentInfoUpdateView.xaml.cs
@@ -0,0 +1,111 @@
+using HandyControl.Controls;
+using SqlSugar;
+using System;
+using System.Windows;
+using WCS.BLL.DbModels;
+using WCS.Model;
+using WCS.Model.ApiModel.MatDetailCurrentInfo;
+using WCS.Model.ApiModel.StoreInfo;
+using WCS.Model.ApiModel.User;
+using 智慧物流软件系统.Api;
+using 智慧物流软件系统.ViewModel;
+
+namespace 智慧物流软件系统
+{
+ public partial class MatDetailCurrentInfoUpdateView : System.Windows.Window
+ {
+ public MatDetailCurrentInfoUpdateViewModel ViewModel = new MatDetailCurrentInfoUpdateViewModel();
+
+ public MatDetailCurrentInfoUpdateView(string _titleText, MatDetailCurrentInfoModel _matDetailCurrentInfoModel = null)
+ {
+ InitializeComponent();
+
+ this.DataContext = ViewModel;
+ ViewModel.textBox = txtMatQty;
+ ViewModel.SetValues(_matDetailCurrentInfoModel);
+ //绑定标题
+ Title.Text = "修改货架存量";
+
+
+ }
+
+
+ private void btnOk_Click(object sender, RoutedEventArgs e)
+ {
+ try
+ {
+ #region 校验填写的值
+ try
+ {
+ txtMatQty.Text = txtMatQty.Text.Trim();
+ var qty = int.Parse(txtMatQty.Text);
+ if (qty < 0)
+ {
+ HandyControl.Controls.MessageBox.Show("数量请输入大于0的值!");
+ return;
+ }
+ else if (qty == 0)
+ {
+ HandyControl.Controls.MessageBox.Show("数量请输入大于0的值!\r\n如果需要设置为0请使用【删除】功能!");
+ return;
+ }
+ }
+ catch (Exception ex)
+ {
+ HandyControl.Controls.MessageBox.Show("数量请输入有效的数字!");
+ return;
+ }
+ #endregion
+
+ #region 保存/修改值
+ var body = new AddLocaionInfoRequest()
+ {
+ UserName = LocalStatic.CurrentUser,
+ DeviceType = LocalFile.Config.DeviceType,
+ LocationInfo = ViewModel.GetValues(),
+ AddOrUpdate = AddOrUpdate.Update
+ };
+ var Result = ApiHelp.GetDataFromHttp>(LocalFile.Config.ApiIpHost + "matDetailCurrenInfo/updateMatDetailCurrentInfo", body, "POST");
+ if (Result != null && Result.Code == 200)
+ {
+
+ Growl.Success("修改成功!");
+ this.DialogResult = true;
+ this.Close();
+ }
+ else
+ {
+ Growl.Error($"{Result?.Message?.ToString()}");
+ }
+ #endregion
+ }
+ //绑定数据
+ catch (Exception ex)
+ {
+ Growl.Error($"操作异常:{ex.Message}");
+ return;
+ }
+ }
+
+ private void closeClick(object sender, RoutedEventArgs e)
+ {
+ this.DialogResult = false;
+ this.Close();
+ }
+
+ private void txtMatQty_GotFocus(object sender, RoutedEventArgs e)
+ {
+ try
+ {
+ var textBox = sender as System.Windows.Controls.TextBox;
+ if (textBox != null)
+ {
+ textBox.CaretIndex = textBox.Text.Length;
+ }
+ }
+ catch
+ {
+ }
+ }
+ }
+}