Skip to content

Commit

Permalink
Last
Browse files Browse the repository at this point in the history
  • Loading branch information
mvakili committed Dec 3, 2016
1 parent 0652653 commit adcd9b7
Show file tree
Hide file tree
Showing 28 changed files with 1,589 additions and 116 deletions.
27 changes: 27 additions & 0 deletions EKAWindowApplication/EKAWindowApplication.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,12 @@
<Compile Include="UI\Form\Defining\WareHouse.Designer.cs">
<DependentUpon>WareHouse.cs</DependentUpon>
</Compile>
<Compile Include="UI\Form\WareHouse\AddOrder.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="UI\Form\WareHouse\AddOrder.Designer.cs">
<DependentUpon>AddOrder.cs</DependentUpon>
</Compile>
<Compile Include="UI\Form\User\AddOrEditUser.cs">
<SubType>Form</SubType>
</Compile>
Expand Down Expand Up @@ -176,6 +182,18 @@
<Compile Include="UI\Form\Main.Designer.cs">
<DependentUpon>Main.cs</DependentUpon>
</Compile>
<Compile Include="UI\Form\WareHouse\Order.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="UI\Form\WareHouse\Order.Designer.cs">
<DependentUpon>Order.cs</DependentUpon>
</Compile>
<Compile Include="UI\Form\WareHouse\MaterialExistance.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="UI\Form\WareHouse\MaterialExistance.Designer.cs">
<DependentUpon>MaterialExistance.cs</DependentUpon>
</Compile>
<Compile Include="UI\IForm.cs" />
<Compile Include="UI\Template\AddOrEditForm.cs">
<SubType>Form</SubType>
Expand Down Expand Up @@ -207,6 +225,9 @@
<EmbeddedResource Include="UI\Form\Defining\WareHouse.resx">
<DependentUpon>WareHouse.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="UI\Form\WareHouse\AddOrder.resx">
<DependentUpon>AddOrder.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="UI\Form\User\AddOrEditUser.resx">
<DependentUpon>AddOrEditUser.cs</DependentUpon>
</EmbeddedResource>
Expand Down Expand Up @@ -240,6 +261,12 @@
<EmbeddedResource Include="UI\Form\Main.resx">
<DependentUpon>Main.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="UI\Form\WareHouse\Order.resx">
<DependentUpon>Order.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="UI\Form\WareHouse\MaterialExistance.resx">
<DependentUpon>MaterialExistance.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="UI\Template\AddOrEditForm.resx">
<DependentUpon>AddOrEditForm.cs</DependentUpon>
</EmbeddedResource>
Expand Down
2 changes: 1 addition & 1 deletion EKAWindowApplication/Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion EKAWindowApplication/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@
<value>خطایی در دریافت اطلاعات رخ داد</value>
</data>
<data name="AccessFail" xml:space="preserve">
<value>اجازه ی حذف ندارید</value>
<value>اجازه ی انجام عملیات را ندارید</value>
</data>
<data name="edit" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\edit1.ico;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
Expand Down
4 changes: 2 additions & 2 deletions EKAWindowApplication/UI/Form/Defining/Material.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ public void Bind()
GroupName = r.MaterialGroup.Name,
r.Qty,
Unit = r.MaterialGroup.Unit.Name,
WareHouseName = r.Orders.OrderByDescending(u => u.DateTime).Select(u => u.WareHouse.Name).FirstOrDefault() ?? ""
WareHouseName = r.Orders.OrderByDescending(u => u.DateTime).ThenBy(u => u.OrderID).Select(u => u.WareHouse.Name).FirstOrDefault() ?? ""

}).ToList();
}).OrderByDescending(u => u.MaterialID).ToList();
rgvList.BestFitColumns();
}

Expand Down
7 changes: 5 additions & 2 deletions EKAWindowApplication/UI/Form/Main.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 19 additions & 8 deletions EKAWindowApplication/UI/Form/Main.cs
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using EKAWindowApplication.UI.Form.Defining;
using EKAWindowApplication.UI.Form.WareHouse;
using Logic.Service;
using Telerik.WinControls.UI;

namespace EKAWindowApplication.UI.Form
{
public partial class Main : Telerik.WinControls.UI.RadForm, IForm
public partial class Main : RadForm, IForm
{
public Main()
{
Expand All @@ -35,7 +31,7 @@ private void ShowForm(object sender, RadForm frm)
{
foreach (var t in radPageView1.Pages)
{
if (t.Tag.ToString().CompareTo(frm.Text) != 0) continue;
if (string.Compare(t.Tag.ToString(), frm.Text, StringComparison.Ordinal) != 0) continue;
t.Select();
radPageView1.SelectedPage = t;
return;
Expand Down Expand Up @@ -90,7 +86,22 @@ private void btnUser_Click(object sender, EventArgs e)

private void btnWareHouse_Click(object sender, EventArgs e)
{
ShowForm(this,new WareHouse());
ShowForm(this,new Defining.WareHouse());
}

private void btnOrder_Click(object sender, EventArgs e)
{
new AddOrder().ShowDialog();
}

private void btnMaterialExistance_Click(object sender, EventArgs e)
{
ShowForm(this, new MaterialExistance());
}

private void btnOrderReport_Click(object sender, EventArgs e)
{
ShowForm(this, new Order());
}
}
}
1 change: 1 addition & 0 deletions EKAWindowApplication/UI/Form/User/AddOrEditUser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ private void btnAccept_Click(object sender, EventArgs e)
MessageBox.Show(Resources.UnknownError);
break;
}

Close();
}
}
Expand Down
2 changes: 1 addition & 1 deletion EKAWindowApplication/UI/Form/User/User.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public void Bind()
IsAdmin = r.IsAdmin ? @"بله" : @"خیر",
InsertDate = PersianDate.ConvertDate.ToFa(r.InsertDate)

}).ToList();
}).OrderByDescending(u => u.UserID).ToList();
rgvList.BestFitColumns();
}

Expand Down
199 changes: 199 additions & 0 deletions EKAWindowApplication/UI/Form/WareHouse/AddOrder.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit adcd9b7

Please sign in to comment.