Ejemplo n.º 1
0
    public ArrayList GetRecentItemList()
    {
        DataTable dt = (DataTable)System.Web.HttpContext.Current.Session[sessionName];
        ArrayList arr = new ArrayList();
        if (dt != null)
        {
            foreach (DataRow dRow in dt.Rows)
            {
                PDReserveItemData data = new PDReserveItemData();
                data.LOID = Convert.ToDouble(dRow["LOID"]);
                data.MASTER = Convert.ToDouble(dRow["MASTER"]);
                //PRItemData RecentData = FlowObj.GetRecentPRItem(data.PRODUCT);
                data.ACTIVE = Constz.ActiveStatus.Active;

                arr.Add(data);
            }
        }
        return arr;
    }
Ejemplo n.º 2
0
    public bool UpdatePDItem(double LOID, string RWBARCODE, string RWNAME, string RWGROUPNAME, double MASTER, string UNAME, int RANK, double PDLOID, double UNIT)
    {
        PDReserveItemData data = new PDReserveItemData();
        data.LOID = Convert.ToDouble(LOID);
        data.MASTER = Convert.ToDouble(MASTER);

        bool ret = true;
        ret = VerifyData(data);

        if (ret)
        {
            DataTable dt = (DataTable)System.Web.HttpContext.Current.Session[sessionName];
            if (dt != null)
            {
                DataRow[] dRows = dt.Select("RANK = " + RANK.ToString());
                DataRow dRow = dRows[0];
                dRow["MASTER"] = Convert.ToDouble(MASTER);
                //dRow["RWBARCODE"] = RWBARCODE;
                //dRow["RWNAME"] = RWNAME;
                //dRow["RWGROUPNAME"] = RWGROUPNAME;
                //ProductSearchData product = FlowObj.GetProductData(Convert.ToDouble(PRODUCT));
                //dRow["BARCODE"] = product.BARCODE;
                //dRow["UNAME"] = FlowObj.GetUnitData(Convert.ToDouble(UNAME)).NAME;
                ReOrder(dt);
                System.Web.HttpContext.Current.Session[sessionName] = dt;
            }
        }
        else throw new ApplicationException(_error);
        return ret;
    }
Ejemplo n.º 3
0
 private bool VerifyData(PDReserveItemData data)
 {
     bool ret = true;
     //if (data.RWNAME = "")
     //{
     //    ret = false;
     //    _error = "¡ÃسÒàÅ×Í¡Çѵ¶Ø´Ôº";
     //}
     if (data.MASTER == 0)
     {
         ret = false;
         _error = "¡ÃسÒÃкػÃÔÁÒ³";
     }
     else
     {
         DataTable dt = (DataTable)System.Web.HttpContext.Current.Session[sessionName];
         foreach (DataRow dRow in dt.Rows)
         {
             if (dRow["RWBARCODE"].ToString() == data.RWBARCODE && Convert.ToDouble(dRow["LOID"]) != data.LOID)
             {
                 _error = "ÃÒ¡ÒÃÇѵ¶Ø´Ôº¹ÕéÁÕÍÂÙèã¹ÃÒ¡ÒÃáÅéÇ";
                 ret = false;
                 break;
             }
         }
     }
     return ret;
 }
Ejemplo n.º 4
0
 public bool CopyPDRequest(string userID, double loidSource)
 {
     PDReserveData data = GetData(loidSource);
     DataTable itemList = GetPDItem(data.LOID);
     ArrayList arr = new ArrayList();
     foreach (DataRow dRow in itemList.Rows)
     {
         PDReserveItemData idata = new PDReserveItemData();
         idata.MASTER = Convert.ToDouble(dRow["MASTER"]);
         idata.ACTIVE = Constz.ActiveStatus.Active;
         arr.Add(idata);
     }
     data.ITEM = arr;
     DALObj.OnDB = false;
     data.LOID = 0;
     data.CODE = "";
     data.STATUS = Constz.Requisition.Status.Waiting.Code;
     //data.ACTIVE = Constz.ActiveStatus.Active;
     //data.ORDERTYPE = Constz.OrderType.PO.Code;
     return UpdateData(userID, data);
 }