⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 operatormanageform.cs

📁 C#电信管理系统
💻 CS
📖 第 1 页 / 共 2 页
字号:
			this.textBox10.Name = "textBox10";
			this.textBox10.Size = new System.Drawing.Size(88, 21);
			this.textBox10.TabIndex = 9;
			this.textBox10.Text = "";
			// 
			// label11
			// 
			this.label11.Location = new System.Drawing.Point(8, 64);
			this.label11.Name = "label11";
			this.label11.Size = new System.Drawing.Size(96, 23);
			this.label11.TabIndex = 8;
			this.label11.Text = "服务区间短信:";
			// 
			// textBox9
			// 
			this.textBox9.Location = new System.Drawing.Point(336, 40);
			this.textBox9.Name = "textBox9";
			this.textBox9.Size = new System.Drawing.Size(88, 21);
			this.textBox9.TabIndex = 7;
			this.textBox9.Text = "";
			// 
			// label10
			// 
			this.label10.Location = new System.Drawing.Point(224, 40);
			this.label10.Name = "label10";
			this.label10.Size = new System.Drawing.Size(96, 23);
			this.label10.TabIndex = 6;
			this.label10.Text = "服务区内短信:";
			// 
			// textBox8
			// 
			this.textBox8.Location = new System.Drawing.Point(128, 40);
			this.textBox8.Name = "textBox8";
			this.textBox8.Size = new System.Drawing.Size(88, 21);
			this.textBox8.TabIndex = 5;
			this.textBox8.Text = "";
			// 
			// label9
			// 
			this.label9.Location = new System.Drawing.Point(8, 40);
			this.label9.Name = "label9";
			this.label9.Size = new System.Drawing.Size(104, 23);
			this.label9.TabIndex = 4;
			this.label9.Text = "漫游通话:";
			// 
			// textBox7
			// 
			this.textBox7.Location = new System.Drawing.Point(336, 16);
			this.textBox7.Name = "textBox7";
			this.textBox7.Size = new System.Drawing.Size(88, 21);
			this.textBox7.TabIndex = 3;
			this.textBox7.Text = "";
			// 
			// label8
			// 
			this.label8.Location = new System.Drawing.Point(224, 16);
			this.label8.Name = "label8";
			this.label8.Size = new System.Drawing.Size(104, 23);
			this.label8.TabIndex = 2;
			this.label8.Text = "服务区间通话:";
			// 
			// textBox6
			// 
			this.textBox6.Location = new System.Drawing.Point(128, 16);
			this.textBox6.Name = "textBox6";
			this.textBox6.Size = new System.Drawing.Size(88, 21);
			this.textBox6.TabIndex = 1;
			this.textBox6.Text = "";
			// 
			// label7
			// 
			this.label7.Location = new System.Drawing.Point(8, 16);
			this.label7.Name = "label7";
			this.label7.Size = new System.Drawing.Size(104, 23);
			this.label7.TabIndex = 0;
			this.label7.Text = "服务区内通话:";
			// 
			// groupBox3
			// 
			this.groupBox3.Controls.Add(this.button6);
			this.groupBox3.Controls.Add(this.button5);
			this.groupBox3.Controls.Add(this.textBox13);
			this.groupBox3.Controls.Add(this.label14);
			this.groupBox3.Controls.Add(this.textBox12);
			this.groupBox3.Controls.Add(this.label13);
			this.groupBox3.Controls.Add(this.textBox11);
			this.groupBox3.Controls.Add(this.label12);
			this.groupBox3.Location = new System.Drawing.Point(8, 200);
			this.groupBox3.Name = "groupBox3";
			this.groupBox3.Size = new System.Drawing.Size(544, 72);
			this.groupBox3.TabIndex = 2;
			this.groupBox3.TabStop = false;
			this.groupBox3.Text = "卡号操作";
			// 
			// button6
			// 
			this.button6.Location = new System.Drawing.Point(440, 40);
			this.button6.Name = "button6";
			this.button6.TabIndex = 7;
			this.button6.Text = "查询详细话单";
			this.button6.Click += new System.EventHandler(this.button6_Click);
			// 
			// button5
			// 
			this.button5.Location = new System.Drawing.Point(440, 16);
			this.button5.Name = "button5";
			this.button5.TabIndex = 6;
			this.button5.Text = "解除挂失";
			this.button5.Click += new System.EventHandler(this.button5_Click);
			// 
			// textBox13
			// 
			this.textBox13.Location = new System.Drawing.Point(88, 40);
			this.textBox13.Name = "textBox13";
			this.textBox13.PasswordChar = '*';
			this.textBox13.Size = new System.Drawing.Size(104, 21);
			this.textBox13.TabIndex = 5;
			this.textBox13.Text = "";
			// 
			// label14
			// 
			this.label14.Location = new System.Drawing.Point(8, 40);
			this.label14.Name = "label14";
			this.label14.Size = new System.Drawing.Size(72, 23);
			this.label14.TabIndex = 4;
			this.label14.Text = "用户口令:";
			// 
			// textBox12
			// 
			this.textBox12.Location = new System.Drawing.Point(264, 16);
			this.textBox12.Name = "textBox12";
			this.textBox12.PasswordChar = '*';
			this.textBox12.Size = new System.Drawing.Size(96, 21);
			this.textBox12.TabIndex = 3;
			this.textBox12.Text = "";
			// 
			// label13
			// 
			this.label13.Location = new System.Drawing.Point(200, 16);
			this.label13.Name = "label13";
			this.label13.Size = new System.Drawing.Size(56, 23);
			this.label13.TabIndex = 2;
			this.label13.Text = "PUK码:";
			// 
			// textBox11
			// 
			this.textBox11.Location = new System.Drawing.Point(88, 16);
			this.textBox11.Name = "textBox11";
			this.textBox11.Size = new System.Drawing.Size(104, 21);
			this.textBox11.TabIndex = 1;
			this.textBox11.Text = "";
			// 
			// label12
			// 
			this.label12.Location = new System.Drawing.Point(8, 16);
			this.label12.Name = "label12";
			this.label12.Size = new System.Drawing.Size(72, 23);
			this.label12.TabIndex = 0;
			this.label12.Text = "卡号:";
			// 
			// groupBox4
			// 
			this.groupBox4.Controls.Add(this.richTextBox1);
			this.groupBox4.Location = new System.Drawing.Point(8, 272);
			this.groupBox4.Name = "groupBox4";
			this.groupBox4.Size = new System.Drawing.Size(544, 152);
			this.groupBox4.TabIndex = 3;
			this.groupBox4.TabStop = false;
			this.groupBox4.Text = "操作结果信息";
			// 
			// richTextBox1
			// 
			this.richTextBox1.Dock = System.Windows.Forms.DockStyle.Fill;
			this.richTextBox1.Location = new System.Drawing.Point(3, 17);
			this.richTextBox1.Name = "richTextBox1";
			this.richTextBox1.Size = new System.Drawing.Size(538, 132);
			this.richTextBox1.TabIndex = 0;
			this.richTextBox1.Text = "";
			// 
			// Form1
			// 
			this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
			this.ClientSize = new System.Drawing.Size(560, 429);
			this.Controls.Add(this.groupBox4);
			this.Controls.Add(this.groupBox3);
			this.Controls.Add(this.groupBox2);
			this.Controls.Add(this.groupBox1);
			this.Name = "Form1";
			this.Text = "移动通信公司操作员管理界面";
			this.groupBox1.ResumeLayout(false);
			this.groupBox2.ResumeLayout(false);
			this.groupBox3.ResumeLayout(false);
			this.groupBox4.ResumeLayout(false);
			this.ResumeLayout(false);

		}
		#endregion

		/// <summary>
		/// 应用程序的主入口点。
		/// </summary>
		[STAThread]
		static void Main() 
		{
			Application.Run(new Form1());
		}
		//初始化
		private void init()
		{
			comboBox1.Items.Add("100");
			comboBox1.Items.Add("50");
			comboBox1.Items.Add("30");
			comboBox1.SelectedIndex=1;
		}
		//创建新卡
		private void button1_Click(object sender, System.EventArgs e)
		{
			string CardNo=textBox1.Text;
			string PIN=textBox2.Text;
			string PUK=textBox3.Text;
			int CustomerID=int.Parse(textBox4.Text);
			decimal Balance=decimal.Parse(comboBox1.SelectedItem.ToString());
			string UserPwd=textBox5.Text;
			DateTime Expiration;
			switch(comboBox1.SelectedItem.ToString())
			{
				case "100":
					Expiration=DateTime.Now.AddYears(1);
					break;
				case "50":
					Expiration=DateTime.Now.AddMonths(6);
					break;
				case "30":
					Expiration=DateTime.Now.AddMonths(3);
					break;
				default:
					Expiration=DateTime.Now;
					break;
			}
			try
			{
				service.CreateCard(CardNo,CustomerID,PUK,PIN,UserPwd,Balance,Expiration);
			}
			catch(Exception ex)
			{
				richTextBox1.AppendText("卡号创建失败!\r\n");
			}
			richTextBox1.AppendText("创建卡号成功!\r\n");
			richTextBox1.AppendText("卡号是:"+CardNo+",余额是:"+
				Balance+",时间期限是:"+Expiration+"\r\n");
		}
		//删除旧卡
		private void button2_Click(object sender, System.EventArgs e)
		{
			string CardNo=textBox1.Text;
			service.DeleteCard(CardNo);
			richTextBox1.AppendText("卡号:"+CardNo+"已被删除!\r\n");
		}
		//设置收费标准
		private void button3_Click(object sender, System.EventArgs e)
		{
			decimal CallInCell=decimal.Parse(textBox6.Text);
			decimal CallInterCell=decimal.Parse(textBox7.Text);
			decimal CallRoaming=decimal.Parse(textBox8.Text);
			decimal SMInCell=decimal.Parse(textBox9.Text);
			decimal SMInterCell=decimal.Parse(textBox10.Text);
			try
			{
				service.SetCharge(CallInCell,CallRoaming,CallInterCell,SMInCell,SMInterCell);
			}
			catch(Exception ex)
			{
				richTextBox1.AppendText(ex.Message+"\r\n");
			}
			richTextBox1.AppendText("设置收费标准成功!\r\n");
		}
		//重新输入收费标准
		private void button4_Click(object sender, System.EventArgs e)
		{
			textBox6.Text="";
			textBox7.Text="";
			textBox8.Text="";
			textBox9.Text="";
			textBox10.Text="";
		}
		//解除挂失
		private void button5_Click(object sender, System.EventArgs e)
		{
			bool result;
			string CardNo=textBox11.Text;
			string PUK=textBox12.Text;
			string UserPwd=textBox13.Text;
			result=service.DelistFromBlackList(CardNo,PUK,UserPwd);
			if(result)
			{
				richTextBox1.AppendText("解除挂失成功!\r\n");
			}
			else
			{
				richTextBox1.AppendText("解除挂失失败,可能的原因:\r\n"
					+"PUK码错,用户口令错,或卡号没有挂失!\r\n");
			}
		}
		//查询详细话单
		private void button6_Click(object sender, System.EventArgs e)
		{
			QueryDetailBillForm QueryForm=new QueryDetailBillForm();
			QueryForm.CardNo=textBox11.Text;
			QueryForm.ShowDialog();
		}
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -