Exemplo n.º 1
0
        public void UpdateMBRepairControl(MBRepairControlInfo condition)
        {
            logger.Debug("(MBRepairControlInfo)UpdateMBRepairControlInfo start, [info]:" + condition);
            try
            {
                  MBRepairControlInfo id = new MBRepairControlInfo();
                id.ID = condition.ID;
                condition.Udt = DateTime.Now;

                utl.miscRep.UpdateDataByID<metas.MBRepairControl, MBRepairControlInfo>(id, condition);
                  

            }
            catch (FisException e)
            {
                logger.Error(e.mErrmsg);
                throw e;
            }
            catch (Exception e)
            {
                logger.Error(e.Message);
                throw;
            }
            finally
            {
                logger.Debug("(MBRepairControlInfo)UpdateInfo end, [info]:" + condition);
            }

        }
Exemplo n.º 2
0
        public void AddMBRepairControl(MBRepairControlInfo condition)
        {
             logger.Debug("(MBRepairControlInfo)AddMBRepairControlInfo start, [info]:" + condition);
            try
            {
               
                condition.Cdt = DateTime.Now;
                condition.Udt = DateTime.Now;
                utl.miscRep.InsertDataWithID<metas.MBRepairControl, MBRepairControlInfo>(condition);
            }
            catch (FisException e)
            {
                logger.Error(e.mErrmsg);
                throw e;
            }
            catch (Exception e)
            {
                logger.Error(e.Message);
                throw;
            }
            finally
            {
                logger.Debug("(MBRepairControlInfo)AddInfo end, [info]:" + condition);
            }


         
        }
Exemplo n.º 3
0
  public IList<MBRepairControlInfo> GeMaterialRequest(MBRepairControlInfo condition,MBRepairControlInfo betweencondition,string betweenColumnName, DateTime beginValue, DateTime endValue)
 {
   
     IList<MBRepairControlInfo> sbInfoList =  utl.miscRep.GetDataByBetween<metas.MBRepairControl, MBRepairControlInfo>(condition, betweencondition, betweenColumnName, beginValue, endValue);
     return sbInfoList;
      
 }
Exemplo n.º 4
0
 public IList<MBRepairControlInfo> GeMaterialRequest(MBRepairControlInfo condition)
 {
   
     IList<MBRepairControlInfo> sbInfoList = utl.miscRep.GetData<metas.MBRepairControl, MBRepairControlInfo>(condition);
     return sbInfoList;
      
 }
Exemplo n.º 5
0
    protected void btnAdd_ServerClick(object sender, EventArgs e)
    {
        try
        {
            string AssignUser = txtAssignUser.Text.ToUpper();
            string PCBNo = txtPCBNo.Text.ToUpper();
            IList<MBRepairControlInfo> ControlInfo = imaterialrequest.GeMaterialRequest(new MBRepairControlInfo { PartNo = PCBNo});
            if (ControlInfo.Count == 0)
            {

                MBRepairControlInfo info = new MBRepairControlInfo();
                info.AssignUser = AssignUser;
                info.PartNo = PCBNo;
                info.MaterialType = "MB";
                info.Stage = "SA";
                info.Family = "";
                info.PCBModelID = "";
                info.Line = "";
                info.Location = "";
                info.Editor = UserId;
                info.Qty = 1;
                info.Status = "Input";
                info.Cdt = DateTime.Now;
                info.Udt = DateTime.Now;
                imaterialrequest.AddMBRepairControl(info);
                showSuccessMessage("保存成功");
            }
            else 
            {
                showErrorMessage("MB号:" + PCBNo + "已存在!");
                //MB号:"+PCBNo+"已存在!
                return;
            }

        }
        finally
        {
          
        }
    }
Exemplo n.º 6
0
        public void DelMBRepairControl(MBRepairControlInfo condition)
        {
            logger.Debug("(MBRepairControlInfo)DelMBRepairControlInfo start, [info]:" + condition);
            try
            {
                utl.miscRep.DeleteData<metas.MBRepairControl, MBRepairControlInfo>(new MBRepairControlInfo { ID = condition.ID });
            }
            catch (FisException e)
            {
                logger.Error(e.mErrmsg);
                throw e;
            }
            catch (Exception e)
            {
                logger.Error(e.Message);
                throw;
            }
            finally
            {
                logger.Debug("(MBRepairControlInfo)DelInfo end, [info]:" + condition);
            }

           
        }
Exemplo n.º 7
0
 protected void Query()
 {
     string stage = cmdstage.SelectedValue.Trim();
     string pdline = cmbPdLine.InnerDropDownList.SelectedValue.Trim();
     string partno = txtpartno.Text.Trim();
     string family = txtfamily.Text.Trim();
     string staus = cmdstatus.SelectedValue.Trim();
     DateTime begin = Convert.ToDateTime(selectfromdate.Value);
     DateTime end = Convert.ToDateTime(selecttodate.Value);
     MBRepairControlInfo condition = new MBRepairControlInfo();
     condition.Stage = stage;
     condition.MaterialType = "Component";
     if (!string.IsNullOrEmpty(pdline))
     {
         condition.Line = pdline;
     }
     if (!string.IsNullOrEmpty(partno))
     {
         condition.PartNo = partno;
     }
     if (!string.IsNullOrEmpty(family))
     {
         condition.Family = family;
     }
     if (!string.IsNullOrEmpty(staus))
     {
         condition.Status = staus;
     }
     MBRepairControlInfo betweencondition = new MBRepairControlInfo { Cdt = DateTime.Now };
     IList<MBRepairControlInfo> ControlInfo = imaterialrequest.GeMaterialRequest(condition, betweencondition, "Cdt", begin, end);
     if (ControlInfo.Count > 0)
     {
         BindAllGridview(ControlInfo, 10);
     }
     else
     {
         showErrorMessage("无数据!");
         BindAllGridview(null, 10);
     }
 }
Exemplo n.º 8
0
    protected void btnAdd_ServerClick(object sender, EventArgs e)
    {
        try
        {
           
            string stage = cmdstage.SelectedValue.Trim().ToUpper();
            string partno = txtpartno.Text.Trim().ToUpper();
            string family = txtfamily.Text.Trim().ToUpper();
            string model = txtmodel.Text.Trim().ToUpper();
            string line = cmbPdLine.InnerDropDownList.SelectedValue.Trim();
            string loction = txtlocation.Text.Trim().ToUpper();
            string qty = txtqty.Text.Trim();
            string remark = txtremark.Text.Trim();
            MBRepairControlInfo info = new MBRepairControlInfo();
            info.PartNo = partno;
            info.MaterialType = "Component";
            info.Stage = stage;
            info.Family = family;
            info.PCBModelID = model;
            info.Line = line;
            info.Location = loction;
            info.Qty = Convert.ToInt32(qty);
            info.Status = "Waiting";
            info.Remark = remark.Trim();
            info.Editor = UserId;
            info.Cdt = DateTime.Now;
            info.Udt = DateTime.Now;
            imaterialrequest.AddMBRepairControl(info);
            bindgd("Waiting");
            showSuccessMessage("保存成功");
        }
        catch (FisException fex)
        {

            showErrorMessage(fex.mErrmsg);
            return;
        }
        catch (System.Exception ex)
        {
            showErrorMessage(ex.Message);
        }
        finally
        {
          
        }
    }