コード例 #1
0
ファイル: SyncMaster.aspx.cs プロジェクト: SpinPratik/CV_V6.3
 protected void btn_Login_Click(object sender, EventArgs e)
 {
     if (txtUserName.Text.Trim() == "")
     {
         lblError_Login.Text = "Please Enter User Name.";
     }
     else if (txtPassword.Text.Trim() == "")
     {
         lblError_Login.Text = "Please Enter Password.";
     }
     else
     {
         TMLServices.GetAuthentication(txtUserName.Text.ToString(), txtPassword.Text.ToString());
         if (TMLServices.securityKey != "")
         {
             Session["UserName"]      = txtUserName.Text.ToString();
             PopupPanel.Visible       = true;
             pnl_updateStatus.Visible = true;
             lbl_Status.Text          = "Server is connected now.Please retry.";
             txtPassword.Text         = "";
             txtUserName.Text         = "";
             divAthuntication.Visible = false;
             divJobCode.Visible       = false;
         }
         else
         {
             lblError_Login.Text = "User Name & Password Not Matched.";
             txtPassword.Text    = "";
             txtUserName.Text    = "";
             txtUserName.Focus();
         }
     }
 }
コード例 #2
0
ファイル: SyncMaster.aspx.cs プロジェクト: SpinPratik/CV_V6.3
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         if (Session["ROLE"] == null || Session["ROLE"].ToString() != "ADMIN")
         {
             Response.Redirect("login.aspx");
         }
         Session["Current_Page"] = "Sync Master";
         this.Title = "Sync Master";
     }
     catch (Exception ex)
     {
         Response.Redirect("login.aspx");
     }
     {
         TMLServices.GetAuthentication();
     }
     //if (!Page.IsPostBack)
     //{
     //}
 }
コード例 #3
0
ファイル: SyncMaster.aspx.cs プロジェクト: SpinPratik/CV_V6.3
 private string UpdateDatabase(string xmlresponse, string ServiceName)
 {
     try
     {
         string       status    = "";
         StringReader theReader = new StringReader(xmlresponse.ToString().Replace("&gt;", ">").Replace("&lt;", "<").Replace("xmlns=\"\"", "xmlns=").Replace("&quot;", "\""));
         DataSet      ds        = new DataSet();
         ds.ReadXml(theReader);
         if (xmlresponse.ToString().Contains("GetRateListByBuIdMasterResponse"))
         {
             status = db.Insert_tRateListByBuIdMaster(ds);
             return(status);
         }
         else if (xmlresponse.ToString().Contains("GetPriceListItemsByRowIdsMasterResponse"))
         {
             status = db.Insert_PriceListItemsMaster(ds);
             return(status);
         }
         else if (xmlresponse.ToString().Contains("GetJobCodeMaster"))
         {
             status = db.Insert_JobCodeMaster(ds);
             return(status);
         }
         else
         {
             return("UNKNOWN SERVICE..");
         }
     }
     catch (Exception ex)
     {
         try
         {
             TMLServices.Error_Tracker(ServiceName, ex.InnerException.Message.ToString(), Session["UserName"].ToString());
         }
         catch (Exception ex1) { }
         return("Error : " + ex.Message.ToString());
     }
 }