Example #1
0
        public void RefreshPosition()
        {
            List <string> status = new List <string>(Status.Split('|'));

            if (status[status.Count - 1] == "在库")
            {
                CurrentWhereOrganization = "";
                CurrentWhereSpot         = Department + "仓库";
            }
            else if (status[status.Count - 1] == "维修")
            {
                List <RepairSlip> RepairSlips = RepairSlip.GetBy(AssetID);
                CurrentWhereOrganization = RepairSlips[RepairSlips.Count - 1].Organization;
                CurrentWhereSpot         = RepairSlips[RepairSlips.Count - 1].Spot;
            }
            else if (status[status.Count - 1] == "领用")
            {
                List <LendSlip> LendSlips = LendSlip.GetBy(AssetID);
                CurrentWhereOrganization = LendSlips[LendSlips.Count - 1].ReceiverDepartment;
                CurrentWhereSpot         = LendSlips[LendSlips.Count - 1].WhereUsing;
            }
            else if (status[status.Count - 1] == "在校")
            {
                List <GageAdjustSlip> AdjustSlips = GageAdjustSlip.GetBy(AssetID);
                CurrentWhereOrganization = AdjustSlips[AdjustSlips.Count - 1].Organization;
                CurrentWhereSpot         = AdjustSlips[AdjustSlips.Count - 1].Spot;
            }
        }
Example #2
0
        public static LendSlip GetBy(int ID)
        {
            string    sql = "select * from LendSlip where ID = " + ID;
            DataTable dt  = Common.SQLHelper.ExecuteQueryToDataTable(Common.SQLHelper.Asset_strConn, sql);

            LendSlip LendSlip = Common.ConvertHelper.DataTableToList <LendSlip>(dt).First();

            return(LendSlip);
        }
Example #3
0
 public void CopyTo(LendSlip A, bool IsCopyNullValue)
 {
     Common.ConvertHelper.Mapper <LendSlip, LendSlip>(this, ref A, IsCopyNullValue);
 }