public bool DelByIDS(string ids) { SafeSC.CheckIDSEx(ids); return(DBCenter.DelByIDS(TbName, PK, ids)); }
public bool Del(int ID) { return(DBCenter.Del(TbName, PK, ID)); }
public DataTable Sel() { return(DBCenter.Sel(TbName)); }
//-------------------- public bool IsExist(double money) { //同种金额的不能重复添加 return DBCenter.IsExist(TbName, "Min='" + money + "'"); }
public PageSetting SelPage(int cpage, int psize) { PageSetting setting = PageSetting.Single(cpage, psize, TbName, PK, ""); DBCenter.SelPage(setting); return setting; }
public bool UpdateByID(M_Shop_RegionPrice model) { return(DBCenter.UpdateByID(model, model.ID)); }
/// <summary> /// 輸入生產編號 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void ttbLot_TextChanged(object sender, EventArgs e) { try { //確認是否有輸入資料 ttbLot.Must(lblLot); #region 取得檢驗資料(查詢機台、序號、機加批號及鍛造批號欄位是否有符合介面輸入的資料,資料狀態必須為MPQC且判定結果為NULL) string sql = @"SELECT A.*, B.EQUIPMENT, B.PASSFLAG, B.BATCHID, B.DEVICE FROM MES_QC_INSP_OBJ A LEFT JOIN MES_QC_INSP B ON A.QC_INSP_SID = B.QC_INSP_SID WHERE (ITEM1 = #[STRING] OR ITEM2 = #[STRING] OR ITEM3 = #[STRING] OR EQUIPMENT = #[STRING]) AND STATUS = 'MPQC' AND QCTYPE = 'MPQC' AND RESULT IS NULL"; var lot = CustomizeFunction.ConvertDMCCode(ttbLot.Text.Trim()); var table = DBCenter.GetDataTable(sql, lot, lot, lot, lot); if (table.Rows.Count == 0) { //生產編號:{0} 查無檢驗資料! throw new Exception(RuleMessage.Error.C10062(lot)); } //清除檢驗清單資料 _QCDataList.Clear(); foreach (DataRow dr in table.Rows) { _QCDataList.Add(new QCData() { ID = dr["QC_INSP_OBJ_SID"].ToString(), EquipmentName = dr["EQUIPMENT"].ToString(), BatchID = dr["BATCHID"].ToString(), ComponentLot = dr["ITEM1"].ToString(), WorkOderLot = dr["ITEM2"].ToString(), MaterialLot = dr["ITEM3"].ToString(), ObjectSID = dr["OBJECTSID"].ToString(), PassFlag = dr["PASSFLAG"].ToString(), QCInspectionSID = dr["QC_INSP_SID"].ToString(), DeviceName = dr["DEVICE"].ToString() }); } #endregion #region 清除介面資料 ddlPQCReasonCode.Items.Clear(); ddlSN.Items.Clear(); ddlEquip.Items.Clear(); ttbMaterialLot.Text = ""; ttbDescr.Text = ""; ttbWorkOrderLot.Text = ""; btnOK.Enabled = false; rdbOK.Checked = true; rdbNG.Checked = false; rdbOK.Enabled = true; rdbNG.Enabled = false; #endregion #region 設置機台資料 //取得所有檢驗資料之不重複機台名稱 foreach (var QCData in _QCDataList) { ListItem newItem = new ListItem(QCData.EquipmentName, QCData.EquipmentName); if (ddlEquip.Items.Contains(newItem) == false) { ddlEquip.Items.Add(newItem); } } if (ddlEquip.Items.Count == 0) { //生產編號:{0} 沒有機台可以選擇! throw new Exception(RuleMessage.Error.C10063(lot)); } if (ddlEquip.Items.Count != 1) { ddlEquip.Items.Insert(0, ""); } else { ddlEquip.SelectedIndex = 0; ddlEquip_SelectedIndexChanged(null, EventArgs.Empty); } #endregion } catch (Exception ex) { ClearField(); AjaxFocus(ttbLot); HandleError(ex); } }
public int insert(M_Student model) { return(DBCenter.Insert(model)); }
/// <summary> ///添加记录 /// </summary> /// <param name="Student"></param> /// <returns></returns> public bool GetInsert(M_Student model) { return(DBCenter.Insert(model) > 0); }
public void DelByIDS(string ids) { SafeSC.CheckIDSEx(ids); DBCenter.DelByIDS(TbName, PK, ids); }
/// <summary> /// 鍛造出站有不良數量直接拆批及送待判工作站 /// </summary> /// <param name="txnLotData">機加批號</param> /// <param name="defectGridDataList">不良清單</param> /// <param name="txnStamp"></param> public void SplitDefectLotList(LotInfoEx txnLotData, List <DefectGridData> defectGridDataList, TransactionStamp txnStamp) { //待判工作站點名稱 string judgeOperationName = ""; //確認是否有不良清單,如果有不良清單的話,則要取得待判工作站資料 if (defectGridDataList.Count > 0) { //在系統資料維護裡,取得此批號對應製程(CPC/CPF)的待判工作站名稱 List <WpcExClassItemInfo> operationList = WpcExClassItemInfo.GetExtendItemListByClassAndRemarks("SAIJudgeOperation"); WpcExClassItemInfo judgeOperationData = operationList.Find(p => p.Remark01 == txnLotData.Process); if (judgeOperationData == null) { //找不到待判站資訊,請至系統資料維護增加資訊,屬性:{0} throw new Exception(RuleMessage.Error.C10014(txnLotData.Process)); } //取得待判工作站名稱 judgeOperationName = judgeOperationData.Remark02; } //處理不良批號 defectGridDataList.ForEach(defectGridData => { //取得原因碼資訊 var reasonData = InfoCenter.GetBySID <ReasonCategoryInfo>(defectGridData.DefectID); //取得批號子單元資訊 var component = ComponentInfo.GetComponentByComponentID(defectGridData.ComponentID); //取得不良子批批號名稱 var splitLotNaming = GetNamingRule("SplitLot", txnStamp.UserID, txnLotData); //批號拆子批 var splitLot = SplitLotInfo.CreateSplitLotByLotAndQuantity(txnLotData.Lot, splitLotNaming.First[0], new List <ComponentInfo>() { component }, reasonData, reasonData.Description); WIPTxn.Default.SplitLot(txnLotData, splitLot, WIPTxn.SplitIndicator.Create(null, null, null, TerminateBehavior.NoTerminate), txnStamp); if (splitLotNaming.Second != null && splitLotNaming.Second.Count != 0) { DBCenter.ExecuteSQL(splitLotNaming.Second); } //註記不良 var compDefect = ComponentDefectObject.Create(component, component.ComponentQuantity, 0, reasonData, defectGridData.DefectDesc); WIPTransaction.DefectComponent(splitLot, new List <ComponentDefectObject>() { compDefect }, WIPTransaction.DefectIndicator.Create(), txnStamp); #region 送至待判工作站 //取得目前批號的流程線上版本 RouteVersionInfo RouteVersion = RouteVersionInfo.GetRouteActiveVersion(txnLotData.RouteName); //以目前工作站名稱去查詢在所有流程中的序號 var routeOperation = RouteOperationInfo.GetRouteAllOperations(RouteVersion).Find(p => p.OperationName == judgeOperationName); //以目前工作站名稱去查詢在所有流程中的序號 var reasonCategory = ReasonCategoryInfo.GetReasonCategoryByCategoryNameAndReason("Common", "OTHER"); ////將批號的UDC01註記不良批 //WIPTransaction.ModifyLotSystemAttribute(splitLot, "USERDEFINECOL01", "Y", txnStamp); ////將批號的UDC02註記工作站序號 //WIPTransaction.ModifyLotSystemAttribute(splitLot, "USERDEFINECOL02", operationSequence, txnStamp); ////將批號的UDC03註記工作站名稱 //WIPTransaction.ModifyLotSystemAttribute(splitLot, "USERDEFINECOL03", operationName, txnStamp); var modifyAttrList = new List <ModifyLotAttributeInfo>(); //將批號的UDC01註記不良批 modifyAttrList.Add(ModifyLotAttributeInfo.CreateLotSystemAttributeInfo("USERDEFINECOL01", "Y")); //將批號的UDC02註記工作站序號 modifyAttrList.Add(ModifyLotAttributeInfo.CreateLotSystemAttributeInfo("USERDEFINECOL02", splitLot.OperationSequence)); //將批號的UDC03註記工作站名稱 modifyAttrList.Add(ModifyLotAttributeInfo.CreateLotSystemAttributeInfo("USERDEFINECOL03", splitLot.OperationName)); WIPTransaction.ModifyLotMultipleAttribute(splitLot, modifyAttrList, txnStamp); WIPTransaction.ReassignOperation(splitLot, routeOperation, reasonCategory, reasonCategory.Description, txnStamp); #endregion }); }
//------------Update public bool UpdateModel(M_Order_LuckCode model) { return(DBCenter.UpdateByID(model, model.ID)); }
//-----------------Insert public int Insert(M_Order_LuckCode model) { return(DBCenter.Insert(model)); }
public void DelByAnsID(string ansids) { SafeSC.CheckIDSEx(ansids); DBCenter.DelByWhere(TbName, "AnsID IN (" + ansids + ")"); }
public bool Add(M_Templata model) { return(DBCenter.Insert(model) > 0); }
/// <summary> ///更新记录 /// </summary> /// <param name="Student"></param> /// <returns></returns> public bool GetUpdate(M_Student model) { return(DBCenter.UpdateByID(model, model.Noteid)); }
/// <summary> /// 根据ID更新 /// </summary> public bool UpdateByID(M_Templata model) { return(DBCenter.UpdateByID(model, model.TemplateID)); }
public DataTable Sel() { return(DBCenter.Sel(TbName, "", PK + " DESC")); }
public int Insert(M_Shop_RegionPrice model) { return(DBCenter.Insert(model)); }
public int Insert(M_CRMS_Attr model) { return(DBCenter.Insert(model)); }
protected void Page_Load(object sender, EventArgs e) { dt = DBCenter.Sel("ZL_Pub_dzmb", "ID=" + Mid); }
public bool UpdateByID(M_CRMS_Attr model) { return(DBCenter.UpdateByID(model, model.ID)); }
public int Insert(M_Shop_MoneyRegular model) { return DBCenter.Insert(model); }
public bool UpdateByID(M_Cash model) { return(DBCenter.UpdateByID(model, model.Y_ID)); }
public bool UpdateByID(M_Shop_MoneyRegular model) { return DBCenter.UpdateByID(model, model.ID); }
public int insert(M_Cash model) { return(DBCenter.Insert(model)); }
public int Insert(M_Design_AnsDetail model) { return(DBCenter.Insert(model)); }
public int insert(M_Templata model) { return(DBCenter.Insert(model)); }
public bool UpdateByID(M_Design_AnsDetail model) { return(DBCenter.UpdateByID(model, model.ID)); }
/// <summary> /// 用于查看问答详情 /// </summary> public DataTable SelForQList(int qid) { string stable = "(SELECT A.*,B.UserName FROM ZL_Design_Answer A LEFT JOIN ZL_User B ON A.UserID=B.UserID)"; return(DBCenter.JoinQuery("A.*,B.IP,B.Source,B.UserName", TbName, stable, "A.AnsID=B.ID", "A.Qid=" + qid, "A.ID DESC")); }