public string share(string region, string industry, string time, string content, string name, string tel, string email)
        {
            bool      istrue  = false;
            MessageEN message = new MessageEN();

            try
            {
                message.message_Region   = region;
                message.message_Industry = industry;

                message.message_Content = content;
                message.message_Creator = name;
                message.remark1         = tel;
                message.remark2         = email;
                message.message_Time    = Convert.ToDateTime("2017/5/14");
                if (bll.InsertMessage(message))
                {
                    istrue = true;
                }
            }
            catch (Exception e)
            {
                Console.Write(e.Message);
            }
            if (istrue)
            {
                return("true");
            }
            else
            {
                return("false");
            }
        }
Ejemplo n.º 2
0
        private void button1_Click(object sender, EventArgs e)
        {
            BLL_Message message1 = new BLL_Message();
            MessageEN   ins      = new MessageEN();

            ins.message_Region   = "北京中关村苹果体验店";
            ins.message_Industry = "电子产品手机";
            ins.message_Title    = "急需600台 iphone 8";
            ins.message_Content  = "因业务扩展 急需600台 iphone 8 有意联系 13271321583";
            ins.message_Pic      = GetBit();
            ins.message_Time     = System.DateTime.Now;
            ins.message_State    = "";
            ins.message_Creator  = "黑手党";
            ins.message_Checker  = "管理员小芳";
            //ins.remark1 = "";
            //ins.remark2 = "";
            message1.InsertMessage(ins);
        }