Example #1
0
 private void simpleButton2_Click(object sender, EventArgs e)
 {
     m_info         = this.Activitie.StructSource.ModelQuantity.NewRow();
     m_info["BH"]   = this.textEditBH.Text.Trim();
     m_info["MC"]   = this.textEditMC.Text.Trim();
     m_info["DW"]   = this.textEditDW.Text.Trim();
     m_info["SCDJ"] = this.calcEditSCDJ.Value;
     m_info["YTLB"] = ytlb.ToString();
     if (m_info["BH"].Equals(string.Empty))
     {
         MsgBox.Alert("请输入编号");
     }
     else
     {
         if (m_Methods_YTLBSummary.GetBindingInfo(m_info["BH"].ToString()) == null)
         {
             this.DialogResult = DialogResult.OK;
         }
         else
         {
             MsgBox.Alert("【" + m_info["BH"].ToString() + "已存在】");
         }
     }
 }
Example #2
0
 public override void ToLua(StreamWriter stream)
 {
     luaConfig = string.Format("{{ Event = 'AttackCircle', UseType = '{0}',Radius = {1}}}", type.ToString(), radius);
     base.ToLua(stream);
 }
Example #3
0
        /// <summary>
        /// 自动绑定
        /// </summary>
        /// <param name="bh"></param>
        /// <returns></returns>
        public void AutoBindingInfo(UseType p_UseType)
        {
            IEnumerable <YTLBSummaryInfo> re = this.Cast <YTLBSummaryInfo>().Where(p => p.BDBH.Trim() == string.Empty && p.YTLB == p_UseType.ToString());

            foreach (YTLBSummaryInfo item in re)
            {
                YTLBSummaryInfo m_info = GetBDBHInfo(item.BH);
                if (m_info == null)
                {
                    IEnumerable <_ObjectQuantityUnitInfo> m_ObjectQuantityUnitInfo = this.Parent.Property.GetAllQuantityUnit.Cast <_ObjectQuantityUnitInfo>().Where(p => p.BH == item.BH);
                    if (m_ObjectQuantityUnitInfo.Count() > 0)
                    {
                        _ObjectQuantityUnitInfo m_defanyl = m_ObjectQuantityUnitInfo.FirstOrDefault();
                        item.BDBH = m_defanyl.BH;
                        item.SLH  = m_defanyl.SLH;
                        item.SCDJ = m_defanyl.SCDJ;
                        item.DEDJ = m_defanyl.DEDJ;
                        item.GGXH = m_defanyl.GGXH;
                        foreach (_ObjectQuantityUnitInfo items in m_ObjectQuantityUnitInfo)
                        {
                            items.STATUS = Status.Update;
                            items.YTLB   = item.YTLB;
                        }
                    }
                    this.Parent.Property.TemporaryCalculate.Calculate();
                }
            }
            this.Parent.Property.YTLBSummaryList_BindingSource.ResetBindings(false);
        }
        private Model.ArchivingMode FromFSharp(UseType useType)
        {
            switch (useType.Tag)
            {
            case UseType.Tags.Concede:
                return(Model.ArchivingMode.Concede);

                break;

            case UseType.Tags.Forbid:
                return(Model.ArchivingMode.Forbid);

                break;

            case UseType.Tags.Prefer:
                return(Model.ArchivingMode.Prefer);

                break;

            default:
                throw new InvalidOperationException(string.Format("Invalid archiving mode %s", useType.ToString()));
                break;
            }
        }